Synax
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
package fr.xephi.authme.security.crypts;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
|
||||
@@ -141,7 +140,7 @@ public class BCRYPT implements EncryptionMethod {
|
||||
* @return the decoded value of x
|
||||
*/
|
||||
private static byte char64(char x) {
|
||||
if ((int) x < 0 || (int) x > index_64.length)
|
||||
if ((int) x > index_64.length)
|
||||
return -1;
|
||||
return index_64[(int) x];
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
|
||||
PBKDF2Parameters params = new PBKDF2Parameters("HmacSHA256", "ASCII", salt.getBytes(), 10000);
|
||||
PBKDF2Engine engine = new PBKDF2Engine(params);
|
||||
|
||||
return result + engine.deriveKey(password, 64).toString();
|
||||
return result + String.valueOf(engine.deriveKey(password, 64));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user