Package org.wildfly.security.sasl.util
Class UsernamePasswordHashUtil
java.lang.Object
org.wildfly.security.sasl.util.UsernamePasswordHashUtil
Deprecated.
A utility class for generating both the {user-name : realm-value : passwd } hash
and the hex encoded version of the hash.
This class makes use of the MessageDigest by single calls to the .digest(byte[]) method,
however beyond that there is no synchronisation so this should not be considered thread safe.
- Author:
- Darran Lofthouse
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.The default constructor for UsernamePasswordHashUtil, when instantiated using this constructor a local MD5 MessageDigest will be used for the generated hashes.Deprecated.Constructor to allow a pre-instantiated MessageDigest to be supplied. -
Method Summary
Modifier and TypeMethodDescriptiongenerateHashedHexURP(String userName, String realm, char[] password) Deprecated.generateHashedHexURP(String userName, String realm, char[] password, boolean utf8StringConversion) Deprecated.byte[]generateHashedURP(String userName, String realm, char[] password) Deprecated.byte[]generateHashedURP(String userName, String realm, char[] password, boolean utf8StringConversion) Deprecated.Takes the supplied username, realm and password and generates the digested { username ':' realm ':' password }
-
Constructor Details
-
UsernamePasswordHashUtil
Deprecated.The default constructor for UsernamePasswordHashUtil, when instantiated using this constructor a local MD5 MessageDigest will be used for the generated hashes.- Throws:
NoSuchAlgorithmException- - If the MD5 MessageDigest fails to be created.
-
UsernamePasswordHashUtil
Deprecated.Constructor to allow a pre-instantiated MessageDigest to be supplied. The supplied MessageDigest will be used for the hash generation requests,- Parameters:
digest- The MessageDigest to use for hash generation requests.
-
-
Method Details
-
generateHashedURP
public byte[] generateHashedURP(String userName, String realm, char[] password, boolean utf8StringConversion) Deprecated.Takes the supplied username, realm and password and generates the digested { username ':' realm ':' password }- Parameters:
userName- The username to use in the generated hash.realm- The realm to use in the generated hash.password- The password to use in the generated hash.utf8StringConversion- Should a conversion to UTF-8 be allowed if non 8859_1 chars are encountered.- Returns:
- The generated hash.
-
generateHashedURP
Deprecated. -
generateHashedHexURP
public String generateHashedHexURP(String userName, String realm, char[] password, boolean utf8StringConversion) Deprecated. -
generateHashedHexURP
Deprecated.
-
org.wildfly.security.password.PasswordFactoryinstead.