Class DigestAlgorithmRegistry
java.lang.Object
se.swedenconnect.sigval.commons.algorithms.DigestAlgorithmRegistry
Registry of supported digest algorithms
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DigestAlgorithmGet registered digest algorithm based on URI identifierstatic DigestAlgorithmget(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) Get registered digest algorithm based on OIDstatic booleanregisterDigestAlgorithm(String uri, org.bouncycastle.asn1.ASN1ObjectIdentifier oid) Register a new supported digest algorithm
-
Constructor Details
-
DigestAlgorithmRegistry
public DigestAlgorithmRegistry()
-
-
Method Details
-
registerDigestAlgorithm
public static boolean registerDigestAlgorithm(String uri, org.bouncycastle.asn1.ASN1ObjectIdentifier oid) Register a new supported digest algorithm- Parameters:
uri- URI identifieroid- Object Identifier (OID)- Returns:
- true if the digest algorithm was added to the registry
-
get
Get registered digest algorithm based on URI identifier- Parameters:
uri- URI identifier- Returns:
- digest algorithm
- Throws:
NoSuchAlgorithmException- if the requested digest algorithm is not in the registry
-
get
public static DigestAlgorithm get(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) throws NoSuchAlgorithmException Get registered digest algorithm based on OID- Parameters:
oid- Object Identifier (OID)- Returns:
- digest algorithm
- Throws:
NoSuchAlgorithmException- if the requested digest algorithm is not in the registry
-