#358 Start refactoring PasswordSecurity
- Add new methods temporarily to NewEncrMethod interface - No data source access within EncryptionMethod implementations - Generate the salt within the EncryptionMethod implementation - Deprecate static methods on PasswordSecurity - Adjust AbstractEncryptionMethodTest to test the classes with the new interface - Add getter for data source instead of accessing field directly
This commit is contained in:
@@ -3,6 +3,9 @@ package fr.xephi.authme.security;
|
||||
import fr.xephi.authme.security.crypts.EncryptionMethod;
|
||||
|
||||
/**
|
||||
* The list of hash algorithms supported by AuthMe. The implementing class must define a public
|
||||
* constructor which takes either no arguments, or a DataSource object (when the salt is stored
|
||||
* separately, writes to the database are necessary).
|
||||
*/
|
||||
public enum HashAlgorithm {
|
||||
|
||||
@@ -36,7 +39,7 @@ public enum HashAlgorithm {
|
||||
SALTEDSHA512(fr.xephi.authme.security.crypts.SALTEDSHA512.class),
|
||||
CUSTOM(null);
|
||||
|
||||
final Class<? extends EncryptionMethod> clazz;
|
||||
private final Class<? extends EncryptionMethod> clazz;
|
||||
|
||||
/**
|
||||
* Constructor for HashAlgorithm.
|
||||
|
||||
Reference in New Issue
Block a user