| Modifier and Type | Field and Description |
|---|---|
| private static final byte[] | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static byte[] | Returns: The client keyThe SCRAM mechanism scramMechanism, byte[] The salted password saltedPassword)Generates a client key, from the salted password. |
| public static byte[] | Returns: The client keyThe SCRAM mechanism scramMechanism, StringPreparation The String preparation stringPreparation, String The non-salted password password, byte[] The bytes representing the salt salt, int The number of iterations iteration)Generates a client key from the password and salt. |
| public static byte[] | Returns: The client proofThe client key clientKey, byte[] The client signature clientSignature)Computes the SCRAM client proof to be sent to the server on the client-final-message. |
| public static byte[] | Returns: The client signatureThe SCRAM mechanism scramMechanism, byte[] The stored key storedKey, String The auth message authMessage)Computes the SCRAM client signature. |
| public static byte[] | Returns: The hashed valueThe SCRAM mechanism scramMechanism, byte[] The value to hash value)Computes the hash function of a given value, based on the SCRAM mechanism hash function. |
| public static byte[] | Returns: The computed HMACThe SCRAM mechanism scramMechanism, byte[] The message to compute the HMAC message, byte[] The key used to initialize the MAC key)Computes the HMAC of the message and key, using the given SCRAM mechanism. |
| public static byte[] | Returns: The salted passwordThe SCRAM mechanism scramMechanism, StringPreparation The String preparation stringPreparation, String The non-salted password password, byte[] The bytes representing the salt salt, int The number of iterations iteration)Compute the salted password, based on the given SCRAM mechanism, the String preparation algorithm, the provided salt and the number of iterations. |
| public static byte[] | Returns: The server keyThe SCRAM mechanism scramMechanism, byte[] The salted password saltedPassword)Generates a server key, from the salted password. |
| public static byte[] | Returns: The server keyThe SCRAM mechanism scramMechanism, StringPreparation The String preparation stringPreparation, String The non-salted password password, byte[] The bytes representing the salt salt, int The number of iterations iteration)Generates a server key from the password and salt. |
| public static byte[] | Returns: The server signatureThe SCRAM mechanism scramMechanism, byte[] The server key serverKey, String The auth message authMessage)Compute the SCRAM server signature. |
| public static byte[] | Returns: The stored keyThe SCRAM mechanism scramMechanism, byte[] The client key clientKey)Generates a stored key, from the salted password. |
| public static boolean | Returns: True if the client proof is correctThe SCRAM mechanism scramMechanism, byte[] The provided client proof clientProof, byte[] The stored key storedKey, String The auth message authMessage)Verifies that a provided client proof is correct. |
| public static boolean | Returns: True if the server signature is correctThe SCRAM mechanism scramMechanism, byte[] The server key serverKey, String The auth message authMessage, byte[] The provided server signature serverSignature)Verifies that a provided server proof is correct. |
| CLIENT_KEY_HMAC_KEY | back to summary |
|---|---|
| private static final byte[] CLIENT_KEY_HMAC_KEY | |
| SERVER_KEY_HMAC_KEY | back to summary |
|---|---|
| private static final byte[] SERVER_KEY_HMAC_KEY | |
| ScramFunctions | back to summary |
|---|---|
| public ScramFunctions() | |
| clientKey | back to summary |
|---|---|
| public static byte[] clientKey(ScramMechanism scramMechanism, byte[] saltedPassword) Generates a client key, from the salted password.
| |
| clientKey | back to summary |
|---|---|
| public static byte[] clientKey(ScramMechanism scramMechanism, StringPreparation stringPreparation, String password, byte[] salt, int iteration) Generates a client key from the password and salt.
| |
| clientProof | back to summary |
|---|---|
| public static byte[] clientProof(byte[] clientKey, byte[] clientSignature) Computes the SCRAM client proof to be sent to the server on the client-final-message.
| |
| clientSignature | back to summary |
|---|---|
| public static byte[] clientSignature(ScramMechanism scramMechanism, byte[] storedKey, String authMessage) Computes the SCRAM client signature.
| |
| hash | back to summary |
|---|---|
| public static byte[] hash(ScramMechanism scramMechanism, byte[] value) Computes the hash function of a given value, based on the SCRAM mechanism hash function.
| |
| hmac | back to summary |
|---|---|
| public static byte[] hmac(ScramMechanism scramMechanism, byte[] message, byte[] key) Computes the HMAC of the message and key, using the given SCRAM mechanism.
| |
| saltedPassword | back to summary |
|---|---|
| public static byte[] saltedPassword(ScramMechanism scramMechanism, StringPreparation stringPreparation, String password, byte[] salt, int iteration) Compute the salted password, based on the given SCRAM mechanism, the String preparation algorithm,
the provided salt and the number of iterations.
| |
| serverKey | back to summary |
|---|---|
| public static byte[] serverKey(ScramMechanism scramMechanism, byte[] saltedPassword) Generates a server key, from the salted password.
| |
| serverKey | back to summary |
|---|---|
| public static byte[] serverKey(ScramMechanism scramMechanism, StringPreparation stringPreparation, String password, byte[] salt, int iteration) Generates a server key from the password and salt.
| |
| serverSignature | back to summary |
|---|---|
| public static byte[] serverSignature(ScramMechanism scramMechanism, byte[] serverKey, String authMessage) Compute the SCRAM server signature.
| |
| storedKey | back to summary |
|---|---|
| public static byte[] storedKey(ScramMechanism scramMechanism, byte[] clientKey) Generates a stored key, from the salted password.
| |
| verifyClientProof | back to summary |
|---|---|
| public static boolean verifyClientProof(ScramMechanism scramMechanism, byte[] clientProof, byte[] storedKey, String authMessage) Verifies that a provided client proof is correct.
| |
| verifyServerSignature | back to summary |
|---|---|
| public static boolean verifyServerSignature(ScramMechanism scramMechanism, byte[] serverKey, String authMessage, byte[] serverSignature) Verifies that a provided server proof is correct.
| |