public abstract class LunaSignature extends SignatureSpi
Any key used to initialize a LunaSignature that was not created on the HSM will be imported into the current default HSM slot.
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
encodedSignature |
protected KeyFactory |
keyFactory |
protected LunaAPI |
lunaAPI |
protected AlgorithmParameters |
mAlgParams |
protected byte[] |
mByteArray |
protected LunaKey |
mKey |
protected long |
mMechType |
protected byte[] |
plainSignature |
appRandom| Constructor and Description |
|---|
LunaSignature(long mechType)
Creates a new LunaSignature with the specified PKCS mechanism type.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
DecodeSignature(int offset,
int len) |
protected abstract int |
EncodeSignature() |
protected Object |
engineGetParameter(String param)
Deprecated.
Use
engineGetParameters()
CANNOT REMOVE THIS : X509Certificate DEFINES engineGetParameter AS ABSTRACT. |
protected AlgorithmParameters |
engineGetParameters() |
protected void |
engineInitSign(PrivateKey key) |
protected void |
engineInitSign(PrivateKey privateKey,
SecureRandom random)
Initializes this signature object with the specified private key for
signing operations.
|
protected void |
engineInitVerify(PublicKey key) |
protected void |
engineSetParameter(String param,
Object value)
Deprecated.
Use
SignatureSpi.engineSetParameter(AlgorithmParameterSpec)
CANNOT REMOVE THIS : X509Certificate DEFINES engineSetParameter AS ABSTRACT. |
protected byte[] |
engineSign() |
protected int |
engineSign(byte[] outbuf,
int offset,
int len) |
protected void |
engineUpdate(byte b) |
protected void |
engineUpdate(byte[] input,
int offset,
int len) |
protected boolean |
engineVerify(byte[] sigBytes) |
protected boolean |
engineVerify(byte[] sigBytes,
int offset,
int length) |
protected byte[] |
getParameterBytes() |
protected abstract void |
resetBuffers() |
clone, engineSetParameter, engineUpdateprotected final long mMechType
protected AlgorithmParameters mAlgParams
protected LunaKey mKey
protected byte[] mByteArray
protected LunaAPI lunaAPI
protected byte[] plainSignature
protected byte[] encodedSignature
protected KeyFactory keyFactory
public LunaSignature(long mechType)
Signature.getInstance()mechType - mechanism for signatureprotected void engineInitSign(PrivateKey privateKey, SecureRandom random) throws InvalidKeyException
random parameter is ignored.engineInitSign in class SignatureSpiprivateKey - the private key of the identity whose signature will
be generated.random - unusedInvalidKeyException - if the key is improperly encoded,
parameters are missing, and so on.protected void engineInitVerify(PublicKey key) throws InvalidKeyException
engineInitVerify in class SignatureSpiInvalidKeyExceptionprotected void engineInitSign(PrivateKey key) throws InvalidKeyException
engineInitSign in class SignatureSpiInvalidKeyExceptionprotected abstract void resetBuffers()
protected void engineUpdate(byte b)
throws SignatureException
engineUpdate in class SignatureSpiSignatureExceptionprotected void engineUpdate(byte[] input,
int offset,
int len)
throws SignatureException
engineUpdate in class SignatureSpiSignatureExceptionprotected byte[] engineSign()
throws SignatureException
engineSign in class SignatureSpiSignatureExceptionprotected int engineSign(byte[] outbuf,
int offset,
int len)
throws SignatureException
engineSign in class SignatureSpiSignatureExceptionprotected boolean engineVerify(byte[] sigBytes)
throws SignatureException
engineVerify in class SignatureSpiSignatureExceptionprotected boolean engineVerify(byte[] sigBytes,
int offset,
int length)
throws SignatureException
engineVerify in class SignatureSpiSignatureExceptionprotected byte[] getParameterBytes()
protected AlgorithmParameters engineGetParameters()
engineGetParameters in class SignatureSpi@Deprecated protected void engineSetParameter(String param, Object value) throws InvalidParameterException
SignatureSpi.engineSetParameter(AlgorithmParameterSpec)
CANNOT REMOVE THIS : X509Certificate DEFINES engineSetParameter AS ABSTRACT.engineSetParameter in class SignatureSpiInvalidParameterException@Deprecated protected Object engineGetParameter(String param) throws InvalidParameterException
engineGetParameters()
CANNOT REMOVE THIS : X509Certificate DEFINES engineGetParameter AS ABSTRACT.engineGetParameter in class SignatureSpiInvalidParameterExceptionprotected abstract int EncodeSignature()
throws SignatureException
SignatureExceptionprotected abstract void DecodeSignature(int offset,
int len)
throws SignatureException
SignatureExceptionCopyright 2014-2016 SafeNet Inc