Package org.forgerock.json.jose.jwt
Interface Algorithm
-
- All Known Implementing Classes:
JweAlgorithm,JwsAlgorithm
public interface AlgorithmThe interface for each possible algorithm that can be used to sign and/or encrypt a JWT.- Since:
- 2.0.0
- See Also:
- JSON Web Algorithms Specification
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetAlgorithm()Gets the actual name of the algorithm that is understood by Java cryptographic operations.StringgetJwaAlgorithmName()Gets the name of the algorithm as defined in the JWA standard.booleanisSymmetric()Indicates whether the algorithm uses the same key for all operations.
-
-
-
Method Detail
-
getAlgorithm
String getAlgorithm()
Gets the actual name of the algorithm that is understood by Java cryptographic operations.- Returns:
- The name of the algorithm.
-
getJwaAlgorithmName
String getJwaAlgorithmName()
Gets the name of the algorithm as defined in the JWA standard.- Returns:
- The name of the algorithm.
-
isSymmetric
boolean isSymmetric()
Indicates whether the algorithm uses the same key for all operations. Symmetric algorithms like AES or HMAC uses a shared secret key for both encryption and decryption, or signing and verification. Public key algorithms use distinct keys for each operation.- Returns:
trueif this algorithm uses the same key for all operations orfalseif it is a public key algorithm.
-
-