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.
|
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,
String password,
byte[] salt,
int iteration)
Compute the salted password
|
boolean |
supportsChannelBinding()
Whether this mechanism supports channel binding
|
String getName()
byte[] digest(byte[] message) throws RuntimeException
message
- the messageRuntimeException
- If the algorithm is not provided by current JVM or any included implementationsbyte[] hmac(byte[] key, byte[] message) throws RuntimeException
key
- the keymessage
- the messageRuntimeException
- If the algorithm is not provided by current JVM or any included implementationsint algorithmKeyLength()
boolean supportsChannelBinding()
byte[] saltedPassword(StringPreparation stringPreparation, String password, byte[] salt, int iteration)
Copyright © 2019–2023. All rights reserved.