Class JWSAlgorithmRegistry
java.lang.Object
se.swedenconnect.sigval.commons.algorithms.JWSAlgorithmRegistry
Registry for JWS signing algorithms
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JWSAlgorithmRegistry
public JWSAlgorithmRegistry()
-
-
Method Details
-
register
Register a new JWS signing algorithm- Parameters:
uri
- URI identifier for the signing algorithmalgorithm
- the new JWS algorithm- Returns:
- true if the algorithm was added to the registry
-
getUri
public static String getUri(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm) throws NoSuchAlgorithmException Get the URI identifier of the JWS algorithm- Parameters:
jwsAlgorithm
- JWS algorithm- Returns:
- URI identifier
- Throws:
NoSuchAlgorithmException
- if the specified algorithm is not in the registry
-
get
Get the JWS algorithm for a signature algorithm URI identifier- Parameters:
uri
- URI identifier- Returns:
- JWS algorithm
- Throws:
NoSuchAlgorithmException
- if the specified algorithm is not in the registry
-