Class DigestUtil
- java.lang.Object
- 
- org.wildfly.security.mechanism.digest.DigestUtil
 
- 
 public class DigestUtil extends Object Common utility functions used by Digest authentication mechanisms.- Author:
- Darran Lofthouse, Peter Skopek.
 
- 
- 
Field SummaryFields Modifier and Type Field Description private static intMAX_PARSED_RESPONSE_SIZE
 - 
Constructor SummaryConstructors Constructor Description DigestUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description private static intaddToParsedChallenge(HashMap<String,byte[]> response, StringBuilder keyBuilder, org.wildfly.common.bytes.ByteStringBuilder valueBuilder, int realmNumber)static char[]getTwoWayPasswordChars(TwoWayPassword password, Supplier<Provider[]> providers, ElytronMessages log)Get array of password chars from TwoWayPasswordprivate static booleanisWhiteSpace(byte b)static HashMap<String,byte[]>parseResponse(byte[] challenge, Charset charset, boolean multiRealm, ElytronMessages log)Client side method to parse challenge sent by server.private static intskipWhiteSpace(byte[] buffer, int startPoint)static byte[]userRealmPasswordDigest(MessageDigest messageDigest, String username, String realm, char[] password)
 
- 
- 
- 
Field Detail- 
MAX_PARSED_RESPONSE_SIZEprivate static final int MAX_PARSED_RESPONSE_SIZE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
parseResponsepublic static HashMap<String,byte[]> parseResponse(byte[] challenge, Charset charset, boolean multiRealm, ElytronMessages log) throws AuthenticationMechanismException Client side method to parse challenge sent by server.- Parameters:
- challenge-
- Returns:
- Throws:
- AuthenticationMechanismException
 
 - 
addToParsedChallengeprivate static int addToParsedChallenge(HashMap<String,byte[]> response, StringBuilder keyBuilder, org.wildfly.common.bytes.ByteStringBuilder valueBuilder, int realmNumber) 
 - 
skipWhiteSpaceprivate static int skipWhiteSpace(byte[] buffer, int startPoint)
 - 
isWhiteSpaceprivate static boolean isWhiteSpace(byte b) 
 - 
userRealmPasswordDigestpublic static byte[] userRealmPasswordDigest(MessageDigest messageDigest, String username, String realm, char[] password) 
 - 
getTwoWayPasswordCharspublic static char[] getTwoWayPasswordChars(TwoWayPassword password, Supplier<Provider[]> providers, ElytronMessages log) throws AuthenticationMechanismException Get array of password chars from TwoWayPassword- Returns:
- Throws:
- SaslException
- AuthenticationMechanismException
 
 
- 
 
-