public interface ScramMechanism
Modifier and Type | Method and Description |
---|---|
int |
algorithmKeyLength()
Returns the length of the key length of the algorithm.
|
byte[] |
digest(byte[] message)
Calculate a message digest, according to the algorithm of the SCRAM mechanism.
|
java.lang.String |
getName()
The name of the mechanism, which must be a value registered under IANA:
SASL SCRAM Family Mechanisms
|
byte[] |
hmac(byte[] key,
byte[] message)
Calculate the hmac of a key and a message, according to the algorithm of the SCRAM mechanism.
|
byte[] |
saltedPassword(StringPreparation stringPreparation,
java.lang.String password,
byte[] salt,
int iteration)
Compute the salted password
|
boolean |
supportsChannelBinding()
Whether this mechanism supports channel binding
|
java.lang.String getName()
byte[] digest(byte[] message) throws java.lang.RuntimeException
message
- the messagejava.lang.RuntimeException
- If the algorithm is not provided by current JVM or any included implementationsbyte[] hmac(byte[] key, byte[] message) throws java.lang.RuntimeException
key
- the keymessage
- the messagejava.lang.RuntimeException
- If the algorithm is not provided by current JVM or any included implementationsint algorithmKeyLength()
boolean supportsChannelBinding()
byte[] saltedPassword(StringPreparation stringPreparation, java.lang.String password, byte[] salt, int iteration)