Minor: delete PlainText implementation

- It never gets used anymore and could cause security issues if we did accidentally use it as EncryptionMethod
This commit is contained in:
ljacqu 2017-10-22 09:26:02 +02:00
parent d6e2369f36
commit b211c97395
3 changed files with 2 additions and 22 deletions

View File

@ -34,7 +34,7 @@ public enum HashAlgorithm {
@Deprecated DOUBLEMD5(fr.xephi.authme.security.crypts.DoubleMd5.class),
@Deprecated MD5(fr.xephi.authme.security.crypts.Md5.class),
@Deprecated PLAINTEXT(fr.xephi.authme.security.crypts.PlainText.class),
@Deprecated PLAINTEXT(null),
@Deprecated SHA1(fr.xephi.authme.security.crypts.Sha1.class),
@Deprecated SHA512(fr.xephi.authme.security.crypts.Sha512.class),
@Deprecated WHIRLPOOL(fr.xephi.authme.security.crypts.Whirlpool.class);

View File

@ -1,20 +0,0 @@
package fr.xephi.authme.security.crypts;
import fr.xephi.authme.security.crypts.description.Recommendation;
import fr.xephi.authme.security.crypts.description.Usage;
/**
* Plaintext password storage.
*
* @deprecated Using this is no longer supported. AuthMe will migrate to SHA256 on startup.
*/
@Deprecated
@Recommendation(Usage.DEPRECATED)
public class PlainText extends UnsaltedMethod {
@Override
public String computeHash(String password) {
return password;
}
}

View File

@ -81,7 +81,7 @@ public class HashAlgorithmIntegrationTest {
// when
for (HashAlgorithm hashAlgorithm : HashAlgorithm.values()) {
if (hashAlgorithm != HashAlgorithm.CUSTOM) {
if (hashAlgorithm != HashAlgorithm.CUSTOM && hashAlgorithm != HashAlgorithm.PLAINTEXT) {
boolean isEnumDeprecated = HashAlgorithm.class.getDeclaredField(hashAlgorithm.name())
.isAnnotationPresent(Deprecated.class);
boolean isDeprecatedClass = hashAlgorithm.getClazz().isAnnotationPresent(Deprecated.class);