Gabriele C da7e7edc37
Fix messaging [WIP] (#1614)
* Fix messaging [WIP]

* Make codeclimate happy

* Codeclimate, pls

* got it, i hope

* Improvements

* Remove duplicated checks, other improvements, make login/logout broadcasts

* Optimize project imports

* Make codeclimate happy again
2018-08-26 15:29:47 +02:00

21 lines
602 B
Java

package fr.xephi.authme.security.crypts;
import fr.xephi.authme.security.HashUtils;
import fr.xephi.authme.security.crypts.description.Recommendation;
import fr.xephi.authme.security.crypts.description.Usage;
import fr.xephi.authme.util.RandomStringUtils;
@Recommendation(Usage.RECOMMENDED)
public class SaltedSha512 extends SeparateSaltMethod {
@Override
public String computeHash(String password, String salt, String name) {
return HashUtils.sha512(password + salt);
}
@Override
public String generateSalt() {
return RandomStringUtils.generateHex(32);
}
}