Package io.jans.as.server.service
Class ServerCryptoProvider
java.lang.Object
io.jans.as.model.crypto.AbstractCryptoProvider
io.jans.as.server.service.ServerCryptoProvider
public class ServerCryptoProvider
extends io.jans.as.model.crypto.AbstractCryptoProvider
- Author:
- Yuriy Zabrovarnyy
-
Constructor Summary
ConstructorsConstructorDescriptionServerCryptoProvider
(io.jans.as.model.crypto.AbstractCryptoProvider cryptoProvider) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(String keyId) boolean
org.json.JSONObject
generateKey
(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime) org.json.JSONObject
generateKey
(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength) org.json.JSONObject
generateKey
(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength, io.jans.as.model.jwk.KeyOpsType keyOpsType) getKeyId
(io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.jwk.Algorithm algorithm, io.jans.as.model.jwk.Use use, io.jans.as.model.jwk.KeyOpsType keyOps) getPrivateKey
(String keyId) getPublicKey
(String keyId) sign
(String signingInput, String keyId, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) boolean
verifySignature
(String signingInput, String encodedSignature, String keyId, org.json.JSONObject jwks, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) Methods inherited from class io.jans.as.model.crypto.AbstractCryptoProvider
checkKeyExpiration, generateJwks, getKeyRegenerationIntervalInDays, getKeys, getPublicKey, setKeyRegenerationIntervalInDays
-
Constructor Details
-
ServerCryptoProvider
public ServerCryptoProvider(io.jans.as.model.crypto.AbstractCryptoProvider cryptoProvider)
-
-
Method Details
-
getKeyId
public String getKeyId(io.jans.as.model.jwk.JSONWebKeySet jsonWebKeySet, io.jans.as.model.jwk.Algorithm algorithm, io.jans.as.model.jwk.Use use, io.jans.as.model.jwk.KeyOpsType keyOps) throws io.jans.as.model.exception.CryptoProviderException - Overrides:
getKeyId
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
generateKey
public org.json.JSONObject generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
generateKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
generateKey
public org.json.JSONObject generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime, int keyLength, io.jans.as.model.jwk.KeyOpsType keyOpsType) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
generateKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
generateKey
public org.json.JSONObject generateKey(io.jans.as.model.jwk.Algorithm algorithm, Long expirationTime) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
generateKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
sign
public String sign(String signingInput, String keyId, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
sign
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
verifySignature
public boolean verifySignature(String signingInput, String encodedSignature, String keyId, org.json.JSONObject jwks, String sharedSecret, io.jans.as.model.crypto.signature.SignatureAlgorithm signatureAlgorithm) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
verifySignature
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
deleteKey
- Specified by:
deleteKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
containsKey
- Specified by:
containsKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
-
getPrivateKey
public PrivateKey getPrivateKey(String keyId) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
getPrivateKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-
getPublicKey
public PublicKey getPublicKey(String keyId) throws io.jans.as.model.exception.CryptoProviderException - Specified by:
getPublicKey
in classio.jans.as.model.crypto.AbstractCryptoProvider
- Throws:
io.jans.as.model.exception.CryptoProviderException
-