Package io.jans.as.model.crypto
Class ElevenCryptoProvider
- java.lang.Object
-
- io.jans.as.model.crypto.AbstractCryptoProvider
-
- io.jans.as.model.crypto.ElevenCryptoProvider
-
public class ElevenCryptoProvider extends AbstractCryptoProvider
- Version:
- February 12, 2019
- Author:
- Javier Rojas Blum
-
-
Field Summary
-
Fields inherited from class io.jans.as.model.crypto.AbstractCryptoProvider
LOG
-
-
Constructor Summary
Constructors Constructor Description ElevenCryptoProvider(java.lang.String generateKeyEndpoint, java.lang.String signEndpoint, java.lang.String verifySignatureEndpoint, java.lang.String deleteKeyEndpoint, java.lang.String accessToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.String keyId)
boolean
deleteKey(java.lang.String keyId)
org.json.JSONObject
generateKey(Algorithm algorithm, java.lang.Long expirationTime)
org.json.JSONObject
generateKey(Algorithm algorithm, java.lang.Long expirationTime, int keyLength)
org.json.JSONObject
generateKey(Algorithm algorithm, java.lang.Long expirationTime, int keyLength, KeyOpsType keyOpsType)
java.security.PrivateKey
getPrivateKey(java.lang.String keyId)
java.security.PublicKey
getPublicKey(java.lang.String keyId)
java.lang.String
sign(java.lang.String signingInput, java.lang.String keyId, java.lang.String shardSecret, SignatureAlgorithm signatureAlgorithm)
boolean
verifySignature(java.lang.String signingInput, java.lang.String encodedSignature, java.lang.String keyId, org.json.JSONObject jwks, java.lang.String sharedSecret, SignatureAlgorithm signatureAlgorithm)
-
Methods inherited from class io.jans.as.model.crypto.AbstractCryptoProvider
checkKeyExpiration, generateJwks, getJwksRequestParam, getKeyId, getKeyRegenerationIntervalInDays, getKeys, getPublicKey, setKeyRegenerationIntervalInDays
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.String keyId)
- Specified by:
containsKey
in classAbstractCryptoProvider
-
generateKey
public org.json.JSONObject generateKey(Algorithm algorithm, java.lang.Long expirationTime, int keyLength) throws CryptoProviderException
- Specified by:
generateKey
in classAbstractCryptoProvider
- Throws:
CryptoProviderException
-
generateKey
public org.json.JSONObject generateKey(Algorithm algorithm, java.lang.Long expirationTime, int keyLength, KeyOpsType keyOpsType) throws CryptoProviderException
- Specified by:
generateKey
in classAbstractCryptoProvider
- Throws:
CryptoProviderException
-
generateKey
public org.json.JSONObject generateKey(Algorithm algorithm, java.lang.Long expirationTime) throws CryptoProviderException
- Specified by:
generateKey
in classAbstractCryptoProvider
- Throws:
CryptoProviderException
-
sign
public java.lang.String sign(java.lang.String signingInput, java.lang.String keyId, java.lang.String shardSecret, SignatureAlgorithm signatureAlgorithm) throws CryptoProviderException
- Specified by:
sign
in classAbstractCryptoProvider
- Throws:
CryptoProviderException
-
verifySignature
public boolean verifySignature(java.lang.String signingInput, java.lang.String encodedSignature, java.lang.String keyId, org.json.JSONObject jwks, java.lang.String sharedSecret, SignatureAlgorithm signatureAlgorithm) throws CryptoProviderException
- Specified by:
verifySignature
in classAbstractCryptoProvider
- Throws:
CryptoProviderException
-
deleteKey
public boolean deleteKey(java.lang.String keyId) throws CryptoProviderException
- Specified by:
deleteKey
in classAbstractCryptoProvider
- Throws:
CryptoProviderException
-
getPrivateKey
public java.security.PrivateKey getPrivateKey(java.lang.String keyId)
- Specified by:
getPrivateKey
in classAbstractCryptoProvider
-
getPublicKey
public java.security.PublicKey getPublicKey(java.lang.String keyId)
- Specified by:
getPublicKey
in classAbstractCryptoProvider
-
-