ScramMechanisms
public interface ScramMechanism
MessageDigest
and Mac
that will not throw a RuntimeException on any JVM, to guarantee true portability of this library.Modifier and Type | Method | Description |
---|---|---|
int |
algorithmKeyLength() |
Returns the length of the key length of the algorithm.
|
Mac |
getMacInstance() |
Gets a constructed
Mac instance, according to the algorithm of the SCRAM mechanism. |
MessageDigest |
getMessageDigestInstance() |
Gets a constructed
MessageDigest instance, 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
|
SecretKeyFactory |
secretKeyFactory() |
Gets a SecretKeyFactory for the given algorithm.
|
SecretKeySpec |
secretKeySpec(byte[] key) |
Generates a key of the algorith used, based on the key given.
|
boolean |
supportsChannelBinding() |
Whether this mechanism supports channel binding
|
String getName()
MessageDigest getMessageDigestInstance() throws RuntimeException
MessageDigest
instance, according to the algorithm of the SCRAM mechanism.RuntimeException
- If the MessageDigest instance of the algorithm is not provided by current JVMMac getMacInstance() throws RuntimeException
Mac
instance, according to the algorithm of the SCRAM mechanism.RuntimeException
- If the Mac instance of the algorithm is not provided by current JVMSecretKeySpec secretKeySpec(byte[] key)
key
- The bytes of the key to useSecretKeyFactory secretKeyFactory()
int algorithmKeyLength()
boolean supportsChannelBinding()
Copyright © 2017–2018. All rights reserved.