public abstract class BaseSignatureAlgorithm extends AlgorithmInfo implements JsonWebSignatureAlgorithm
log
Constructor and Description |
---|
BaseSignatureAlgorithm(String id,
String javaAlgo,
String keyAlgo) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAvailable() |
protected void |
setAlgorithmParameterSpec(AlgorithmParameterSpec algorithmParameterSpec) |
byte[] |
sign(Key key,
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) |
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType
protected void setAlgorithmParameterSpec(AlgorithmParameterSpec algorithmParameterSpec)
public boolean verifySignature(byte[] signatureBytes, Key key, byte[] securedInputBytes) throws JoseException
verifySignature
in interface JsonWebSignatureAlgorithm
JoseException
public byte[] sign(Key key, byte[] securedInputBytes) throws JoseException
sign
in interface JsonWebSignatureAlgorithm
JoseException
public abstract void validatePrivateKey(PrivateKey privateKey) throws InvalidKeyException
InvalidKeyException
public void validateSigningKey(Key key) throws InvalidKeyException
validateSigningKey
in interface JsonWebSignatureAlgorithm
InvalidKeyException
public abstract void validatePublicKey(PublicKey publicKey) throws InvalidKeyException
InvalidKeyException
public void validateVerificationKey(Key key) throws InvalidKeyException
validateVerificationKey
in interface JsonWebSignatureAlgorithm
InvalidKeyException
public boolean isAvailable()
isAvailable
in interface Algorithm
Copyright © 2015. All rights reserved.