public class NativeSignatureSpi extends AbstractSignatureSpi
appRandom| Constructor and Description |
|---|
NativeSignatureSpi(int nativeAlgorithmId,
String messageDigestAlgorithmName) |
| Modifier and Type | Method and Description |
|---|---|
static void |
getAlgOID(byte[] algorithm,
byte[] oid,
int oidSize)
Get algorithm OID "Object identifier".
|
protected byte[] |
implSign(byte[] digestValue) |
protected boolean |
implVerify(byte[] sigBytes,
byte[] digestValue) |
static int |
nativeGetAlgorithmDescription(byte[] algorithm,
byte[] digestAlgorithmName,
int digestAlgorithmNameLength)
Gets for the given algorithm the signature algorithm description.
|
protected void |
setKeys(PublicKey publicKey,
PrivateKey privateKey)
Sets the public and private keys for this signature.
|
engineInitSign, engineInitVerify, engineSign, engineUpdate, engineUpdate, engineVerify, getDigestValue, resetDigestclone, engineInitSign, engineSetParameter, engineSign, engineVerifypublic NativeSignatureSpi(int nativeAlgorithmId,
String messageDigestAlgorithmName)
public static void getAlgOID(byte[] algorithm,
byte[] oid,
int oidSize)
throws NativeException
algorithm - algorithm name, null terminated `\0`oid - byte array containing a string representation of the Object identifieroidSize - the size of oid arrayNativeException - on errorprotected byte[] implSign(byte[] digestValue)
implSign in class AbstractSignatureSpiprotected boolean implVerify(byte[] sigBytes,
byte[] digestValue)
implVerify in class AbstractSignatureSpipublic static int nativeGetAlgorithmDescription(byte[] algorithm,
byte[] digestAlgorithmName,
int digestAlgorithmNameLength)
algorithm - Null terminated string that describes the algorithmdigestAlgorithmName - (output param) Null terminated string that describes the digest algorithm.digestAlgorithmNameLength - (output param) Length of digest_algorithm.protected void setKeys(PublicKey publicKey, PrivateKey privateKey) throws InvalidKeyException
AbstractSignatureSpisetKeys in class AbstractSignatureSpipublicKey - the public key to setprivateKey - the private key to setInvalidKeyException - if one of the keys is invalid.