public abstract class BaseSignatureAlgorithm extends AlgorithmInfo implements JsonWebSignatureAlgorithm
| Constructor and Description |
|---|
BaseSignatureAlgorithm(String id,
String javaAlgo,
String keyAlgo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable() |
CryptoPrimitive |
prepareForSign(Key key,
ProviderContext providerContext) |
protected void |
setAlgorithmParameterSpec(AlgorithmParameterSpec algorithmParameterSpec) |
byte[] |
sign(CryptoPrimitive cryptoPrimitive,
byte[] securedInputBytes) |
abstract void |
validatePrivateKey(PrivateKey privateKey) |
abstract void |
validatePublicKey(PublicKey publicKey) |
void |
validateSigningKey(Key key) |
void |
validateVerificationKey(Key key) |
boolean |
verifySignature(byte[] signatureBytes,
Key key,
byte[] securedInputBytes,
ProviderContext providerContext) |
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyTypeprotected void setAlgorithmParameterSpec(AlgorithmParameterSpec algorithmParameterSpec)
public boolean verifySignature(byte[] signatureBytes,
Key key,
byte[] securedInputBytes,
ProviderContext providerContext)
throws JoseException
verifySignature in interface JsonWebSignatureAlgorithmJoseExceptionpublic CryptoPrimitive prepareForSign(Key key, ProviderContext providerContext) throws JoseException
prepareForSign in interface JsonWebSignatureAlgorithmJoseExceptionpublic byte[] sign(CryptoPrimitive cryptoPrimitive, byte[] securedInputBytes) throws JoseException
sign in interface JsonWebSignatureAlgorithmJoseExceptionpublic abstract void validatePrivateKey(PrivateKey privateKey) throws InvalidKeyException
InvalidKeyExceptionpublic void validateSigningKey(Key key) throws InvalidKeyException
validateSigningKey in interface JsonWebSignatureAlgorithmInvalidKeyExceptionpublic abstract void validatePublicKey(PublicKey publicKey) throws InvalidKeyException
InvalidKeyExceptionpublic void validateVerificationKey(Key key) throws InvalidKeyException
validateVerificationKey in interface JsonWebSignatureAlgorithmInvalidKeyExceptionpublic boolean isAvailable()
isAvailable in interface AlgorithmCopyright © 2021. All rights reserved.