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.
-
-
Constructor Summary
Constructors Constructor Description DigestUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static char[]getTwoWayPasswordChars(TwoWayPassword password, Supplier<Provider[]> providers, ElytronMessages log)Get array of password chars from TwoWayPasswordstatic HashMap<String,byte[]>parseResponse(byte[] challenge, Charset charset, boolean multiRealm, ElytronMessages log)Client side method to parse challenge sent by server.static byte[]userRealmPasswordDigest(MessageDigest messageDigest, String username, String realm, char[] password)
-
-
-
Method Detail
-
parseResponse
public 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
-
userRealmPasswordDigest
public static byte[] userRealmPasswordDigest(MessageDigest messageDigest, String username, String realm, char[] password)
-
getTwoWayPasswordChars
public static char[] getTwoWayPasswordChars(TwoWayPassword password, Supplier<Provider[]> providers, ElytronMessages log) throws AuthenticationMechanismException
Get array of password chars from TwoWayPassword- Returns:
- Throws:
SaslExceptionAuthenticationMechanismException
-
-