Package org.jose4j.jws
Class BaseSignatureAlgorithm
java.lang.Object
org.jose4j.jwa.AlgorithmInfo
org.jose4j.jws.BaseSignatureAlgorithm
- All Implemented Interfaces:
Algorithm,JsonWebSignatureAlgorithm
- Direct Known Subclasses:
EcdsaUsingShaAlgorithm,EdDsaAlgorithm,RsaUsingShaAlgorithm
public abstract class BaseSignatureAlgorithm
extends AlgorithmInfo
implements JsonWebSignatureAlgorithm
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprepareForSign(Key key, ProviderContext providerContext) protected voidsetAlgorithmParameterSpec(AlgorithmParameterSpec algorithmParameterSpec) byte[]sign(CryptoPrimitive cryptoPrimitive, byte[] securedInputBytes) abstract voidvalidatePrivateKey(PrivateKey privateKey) abstract voidvalidatePublicKey(PublicKey publicKey) voidvalidateSigningKey(Key key) voidbooleanverifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes, ProviderContext providerContext) Methods inherited from class org.jose4j.jwa.AlgorithmInfo
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jose4j.jwa.Algorithm
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType
-
Constructor Details
-
BaseSignatureAlgorithm
-
-
Method Details
-
setAlgorithmParameterSpec
-
verifySignature
public boolean verifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes, ProviderContext providerContext) throws JoseException - Specified by:
verifySignaturein interfaceJsonWebSignatureAlgorithm- Throws:
JoseException
-
prepareForSign
public CryptoPrimitive prepareForSign(Key key, ProviderContext providerContext) throws JoseException - Specified by:
prepareForSignin interfaceJsonWebSignatureAlgorithm- Throws:
JoseException
-
sign
- Specified by:
signin interfaceJsonWebSignatureAlgorithm- Throws:
JoseException
-
validatePrivateKey
- Throws:
InvalidKeyException
-
validateSigningKey
- Specified by:
validateSigningKeyin interfaceJsonWebSignatureAlgorithm- Throws:
InvalidKeyException
-
validatePublicKey
- Throws:
InvalidKeyException
-
validateVerificationKey
- Specified by:
validateVerificationKeyin interfaceJsonWebSignatureAlgorithm- Throws:
InvalidKeyException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceAlgorithm
-