Package org.webpki.crypto
Enum Class HashAlgorithms
- All Implemented Interfaces:
Serializable,Comparable<HashAlgorithms>,Constable,CryptoAlgorithms
Hash 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[] data) static HashAlgorithmsgetAlgorithmFromId(String algorithmId, AlgorithmPreferences algorithmPreferences) static HashAlgorithmsgetAlgorithmId(AlgorithmPreferences algorithmPreferences) intgetOid()intbooleanbooleanbooleanstatic HashAlgorithmsReturns the enum constant of this class with the specified name.static HashAlgorithms[]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
-
Enum Constant Details
-
SHA1
-
SHA256
-
SHA384
-
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
-
getJceName
- Specified by:
getJceNamein interfaceCryptoAlgorithms
-
digest
public byte[] digest(byte[] data) -
getCoseAlgorithmId
public int getCoseAlgorithmId()- Specified by:
getCoseAlgorithmIdin interfaceCryptoAlgorithms
-
getAlgorithmFromOid
-
getAlgorithmFromId
public static HashAlgorithms getAlgorithmFromId(String algorithmId, AlgorithmPreferences algorithmPreferences) -
isMandatorySksAlgorithm
public boolean isMandatorySksAlgorithm()- Specified by:
isMandatorySksAlgorithmin interfaceCryptoAlgorithms
-
getAlgorithmId
- Specified by:
getAlgorithmIdin interfaceCryptoAlgorithms
-
getOid
- Specified by:
getOidin interfaceCryptoAlgorithms
-
isSymmetric
public boolean isSymmetric()- Specified by:
isSymmetricin interfaceCryptoAlgorithms
-
isDeprecated
public boolean isDeprecated()- Specified by:
isDeprecatedin interfaceCryptoAlgorithms
-
getKeyType
- Specified by:
getKeyTypein interfaceCryptoAlgorithms
-
getResultBytes
public int getResultBytes()
-