Package org.digidoc4j
Enum DigestAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<DigestAlgorithm>
,java.lang.constant.Constable
Supported algorithms
-
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[]
static DigestAlgorithm
findByAlgorithm
(String algorithm) Find DigestAlgorithm by algorithm string.static DigestAlgorithm
Find DigestAlgorithm by algorithm OID string.static URL
getDigestAlgorithmUri
(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Obtain digest algorithm URI from DSS digest algorithm.eu.europa.esig.dss.enumerations.DigestAlgorithm
toString()
Get uri stringuri()
Get uristatic DigestAlgorithm
Returns the enum constant of this type with the specified name.static DigestAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
SHA1
-
SHA224
-
SHA256
-
SHA384
-
SHA512
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
uri
Get uri- Returns:
- uri
-
digestInfoPrefix
public byte[] digestInfoPrefix() -
getDssDigestAlgorithm
public eu.europa.esig.dss.enumerations.DigestAlgorithm getDssDigestAlgorithm() -
toString
Get uri string- Overrides:
toString
in classEnum<DigestAlgorithm>
- Returns:
- uri
-
findByAlgorithm
Find DigestAlgorithm by algorithm string.- Parameters:
algorithm
-- Returns:
- DigestAlgorithm.
-
findByOid
Find DigestAlgorithm by algorithm OID string.- Parameters:
oid
- algorithm OID string- Returns:
- an instance of DigestAlgorithm that matches the specified OID, or
null
-
getDigestAlgorithmUri
public static URL getDigestAlgorithmUri(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) Obtain digest algorithm URI from DSS digest algorithm.- Parameters:
digestAlgorithm
- DSS digest algorithm- Returns:
- URI of the digest algorithm
- Throws:
TechnicalException
- if there is no URI specified for the algorithm
-