#364 Create first EncryptionMethod tests

This commit is contained in:
ljacqu
2015-12-20 00:50:34 +01:00
parent 4f6c7d579c
commit bf7a0c5a49
9 changed files with 201 additions and 19 deletions
@@ -1,6 +1,6 @@
package fr.xephi.authme.security;
import org.apache.commons.lang.ObjectUtils.Null;
import fr.xephi.authme.security.crypts.EncryptionMethod;
/**
*/
@@ -33,21 +33,21 @@ public enum HashAlgorithm {
CRAZYCRYPT1(fr.xephi.authme.security.crypts.CRAZYCRYPT1.class),
BCRYPT2Y(fr.xephi.authme.security.crypts.BCRYPT2Y.class),
SALTEDSHA512(fr.xephi.authme.security.crypts.SALTEDSHA512.class),
CUSTOM(Null.class);
CUSTOM(null);
final Class<?> classe;
final Class<? extends EncryptionMethod> clazz;
/**
* Constructor for HashAlgorithm.
*
* @param classe The class of the hash implementation.
* @param clazz The class of the hash implementation.
*/
HashAlgorithm(Class<?> classe) {
this.classe = classe;
HashAlgorithm(Class<? extends EncryptionMethod> clazz) {
this.clazz = clazz;
}
public Class<?> getclasse() {
return classe;
public Class<? extends EncryptionMethod> getClazz() {
return clazz;
}
}