Package org.webpki.crypto
Enum Class HmacAlgorithms
- All Implemented Interfaces:
Serializable,Comparable<HmacAlgorithms>,Constable,CryptoAlgorithms,SignatureAlgorithms
HMAC algorithms including an implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbyte[]digest(byte[] key, byte[] data) static HmacAlgorithmsgetAlgorithmFromId(int coseAlgorithmId) static HmacAlgorithmsgetAlgorithmFromId(String algorithmId, AlgorithmPreferences algorithmPreferences) getAlgorithmId(AlgorithmPreferences algorithmPreferences) intgetOid()booleanbooleanstatic booleantestAlgorithmUri(String sksId) static HmacAlgorithmsReturns the enum constant of this class with the specified name.static HmacAlgorithms[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface org.webpki.crypto.CryptoAlgorithms
getJoseAlgorithmId, isSymmetric
-
Enum Constant Details
-
HMAC_SHA1
-
HMAC_SHA256
-
HMAC_SHA384
-
HMAC_SHA512
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isMandatorySksAlgorithm
public boolean isMandatorySksAlgorithm()- Specified by:
isMandatorySksAlgorithmin interfaceCryptoAlgorithms
-
getJceName
- Specified by:
getJceNamein interfaceCryptoAlgorithms
-
getOid
- Specified by:
getOidin interfaceCryptoAlgorithms
-
digest
public byte[] digest(byte[] key, byte[] data) -
testAlgorithmUri
-
getAlgorithmFromId
public static HmacAlgorithms getAlgorithmFromId(String algorithmId, AlgorithmPreferences algorithmPreferences) -
getAlgorithmId
- Specified by:
getAlgorithmIdin interfaceCryptoAlgorithms
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecatedin interfaceCryptoAlgorithms
-
getDigestAlgorithm
- Specified by:
getDigestAlgorithmin interfaceSignatureAlgorithms
-
getKeyType
- Specified by:
getKeyTypein interfaceCryptoAlgorithms
-
getCoseAlgorithmId
public int getCoseAlgorithmId()- Specified by:
getCoseAlgorithmIdin interfaceCryptoAlgorithms
-
getAlgorithmFromId
-