Package tigase.auth.mechanisms
Class SCRAMHelper
java.lang.Object
tigase.auth.mechanisms.SCRAMHelper
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionencodePlainPassword
(String algorithm, byte[] salt, int iterations, String plainPassword) Encode plain password to SCRAM authentication data: ServerKey and StoredKey.Transcode Salted Password (PBKDF2) to SCRAM authentication data: ServerKey and StoredKey.
-
Method Details
-
encodePlainPassword
public static SCRAMHelper.AuthenticationData encodePlainPassword(String algorithm, byte[] salt, int iterations, String plainPassword) throws NoSuchAlgorithmException, InvalidKeyException Encode plain password to SCRAM authentication data: ServerKey and StoredKey.- Parameters:
algorithm
- algorithm.salt
- salt.iterations
- iterations.plainPassword
- plain password.- Returns:
- authentication data
- Throws:
NoSuchAlgorithmException
InvalidKeyException
-
transcode
public static SCRAMHelper.AuthenticationData transcode(String algorithm, byte[] saltedPassword) throws NoSuchAlgorithmException, InvalidKeyException Transcode Salted Password (PBKDF2) to SCRAM authentication data: ServerKey and StoredKey.- Parameters:
algorithm
- algorithm.saltedPassword
- salted password to transcode.- Returns:
- authentication data.
- Throws:
NoSuchAlgorithmException
InvalidKeyException
-