Package org.wildfly.security.sasl.util
Class UsernamePasswordHashUtil
- java.lang.Object
 - 
- org.wildfly.security.sasl.util.UsernamePasswordHashUtil
 
 
- 
@Deprecated public class UsernamePasswordHashUtil extends Object
Deprecated.UsePasswordFactoryinstead.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
Constructors Constructor Description UsernamePasswordHashUtil()Deprecated.The default constructor for UsernamePasswordHashUtil, when instantiated using this constructor a local MD5 MessageDigest will be used for the generated hashes.UsernamePasswordHashUtil(MessageDigest digest)Deprecated.Constructor to allow a pre-instantiated MessageDigest to be supplied. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description StringgenerateHashedHexURP(String userName, String realm, char[] password)Deprecated.StringgenerateHashedHexURP(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 Detail
- 
UsernamePasswordHashUtil
public UsernamePasswordHashUtil() throws NoSuchAlgorithmExceptionDeprecated.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
public UsernamePasswordHashUtil(MessageDigest digest)
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 Detail
- 
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
public byte[] generateHashedURP(String userName, String realm, char[] password)
Deprecated. 
- 
generateHashedHexURP
public String generateHashedHexURP(String userName, String realm, char[] password, boolean utf8StringConversion)
Deprecated. 
 - 
 
 -