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 and Description |
---|---|
int |
algorithmKeyLength()
Returns the length of the key length of the algorithm.
|
javax.crypto.Mac |
getMacInstance()
Gets a constructed
Mac instance, according to the algorithm of the SCRAM mechanism. |
java.security.MessageDigest |
getMessageDigestInstance()
Gets a constructed
MessageDigest instance, 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
|
javax.crypto.SecretKeyFactory |
secretKeyFactory()
Gets a SecretKeyFactory for the given algorithm.
|
javax.crypto.spec.SecretKeySpec |
secretKeySpec(byte[] key)
Generates a key of the algorith used, based on the key given.
|
boolean |
supportsChannelBinding()
Whether this mechanism supports channel binding
|
java.lang.String getName()
java.security.MessageDigest getMessageDigestInstance() throws java.lang.RuntimeException
MessageDigest
instance, according to the algorithm of the SCRAM mechanism.java.lang.RuntimeException
- If the MessageDigest instance of the algorithm is not provided by current JVMjavax.crypto.Mac getMacInstance() throws java.lang.RuntimeException
Mac
instance, according to the algorithm of the SCRAM mechanism.java.lang.RuntimeException
- If the Mac instance of the algorithm is not provided by current JVMjavax.crypto.spec.SecretKeySpec secretKeySpec(byte[] key)
key
- The bytes of the key to usejavax.crypto.SecretKeyFactory secretKeyFactory()
int algorithmKeyLength()
boolean supportsChannelBinding()