org.opensc.pkcs11.spi
Class PKCS11SignatureSpi
java.lang.Object
java.security.SignatureSpi
org.opensc.pkcs11.spi.PKCS11SignatureSpi
public class PKCS11SignatureSpi
- extends SignatureSpi
The signature service of the OpenSC PKCS#11 provider.
- Author:
- wglas
PKCS11SignatureSpi
public PKCS11SignatureSpi(PKCS11Provider provider,
String algorithm)
- Contructs an instance of PKCS11SignatureSpi using the given provider
and algorithm. Usually, you will not have to call this contructor,
This class is implicitly instantiated using Signature.getInstance().
- See Also:
Signature.getInstance(java.lang.String, java.security.Provider)
engineInitVerify
protected void engineInitVerify(PublicKey pubKey)
throws InvalidKeyException
- Specified by:
engineInitVerify in class SignatureSpi
- Throws:
InvalidKeyException
engineInitSign
protected void engineInitSign(PrivateKey privKey,
SecureRandom random)
throws InvalidKeyException
- Overrides:
engineInitSign in class SignatureSpi
- Throws:
InvalidKeyException
engineInitSign
protected void engineInitSign(PrivateKey privKey)
throws InvalidKeyException
- Specified by:
engineInitSign in class SignatureSpi
- Throws:
InvalidKeyException
engineUpdate
protected void engineUpdate(byte b)
throws SignatureException
- Specified by:
engineUpdate in class SignatureSpi
- Throws:
SignatureException
engineUpdate
protected void engineUpdate(byte[] data,
int off,
int len)
throws SignatureException
- Specified by:
engineUpdate in class SignatureSpi
- Throws:
SignatureException
engineSign
protected byte[] engineSign()
throws SignatureException
- Specified by:
engineSign in class SignatureSpi
- Throws:
SignatureException
engineVerify
protected boolean engineVerify(byte[] signature)
throws SignatureException
- Specified by:
engineVerify in class SignatureSpi
- Throws:
SignatureException
engineSetParameter
protected void engineSetParameter(String key,
Object value)
throws InvalidParameterException
- Specified by:
engineSetParameter in class SignatureSpi
- Throws:
InvalidParameterException
engineGetParameter
protected Object engineGetParameter(String key)
throws InvalidParameterException
- Specified by:
engineGetParameter in class SignatureSpi
- Throws:
InvalidParameterException