Package org.keycloak.crypto
Class ECDSASignatureProvider
- java.lang.Object
-
- org.keycloak.crypto.ECDSASignatureProvider
-
- All Implemented Interfaces:
SignatureProvider
,Provider
public class ECDSASignatureProvider extends Object implements SignatureProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ECDSASignatureProvider.ECDSA
-
Constructor Summary
Constructors Constructor Description ECDSASignatureProvider(KeycloakSession session, String algorithm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static byte[]
asn1derToConcatenatedRS(byte[] derEncodedSignatureValue, int signLength)
static byte[]
concatenatedRSToASN1DER(byte[] signature, int signLength)
boolean
isAsymmetricAlgorithm()
SignatureSignerContext
signer()
SignatureSignerContext
signer(KeyWrapper key)
SignatureVerifierContext
verifier(String kid)
SignatureVerifierContext
verifier(KeyWrapper key)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.keycloak.crypto.SignatureProvider
close
-
-
-
-
Constructor Detail
-
ECDSASignatureProvider
public ECDSASignatureProvider(KeycloakSession session, String algorithm)
-
-
Method Detail
-
signer
public SignatureSignerContext signer() throws SignatureException
- Specified by:
signer
in interfaceSignatureProvider
- Throws:
SignatureException
-
signer
public SignatureSignerContext signer(KeyWrapper key) throws SignatureException
- Specified by:
signer
in interfaceSignatureProvider
- Throws:
SignatureException
-
verifier
public SignatureVerifierContext verifier(String kid) throws VerificationException
- Specified by:
verifier
in interfaceSignatureProvider
- Throws:
VerificationException
-
verifier
public SignatureVerifierContext verifier(KeyWrapper key) throws VerificationException
- Specified by:
verifier
in interfaceSignatureProvider
- Throws:
VerificationException
-
isAsymmetricAlgorithm
public boolean isAsymmetricAlgorithm()
- Specified by:
isAsymmetricAlgorithm
in interfaceSignatureProvider
-
concatenatedRSToASN1DER
public static byte[] concatenatedRSToASN1DER(byte[] signature, int signLength) throws IOException
- Throws:
IOException
-
asn1derToConcatenatedRS
public static byte[] asn1derToConcatenatedRS(byte[] derEncodedSignatureValue, int signLength) throws IOException
- Throws:
IOException
-
-