public class SymmetricSignatureImpl
extends javacard.security.Signature
Signature with symmetric keys based
on BouncyCastle CryptoAPI.SignatureALG_AES_CMAC_128, ALG_AES_MAC_128_NOPAD, ALG_AES_MAC_192_NOPAD, ALG_AES_MAC_256_NOPAD, ALG_DES_MAC4_ISO9797_1_M1_ALG3, ALG_DES_MAC4_ISO9797_1_M2_ALG3, ALG_DES_MAC4_ISO9797_M1, ALG_DES_MAC4_ISO9797_M2, ALG_DES_MAC4_NOPAD, ALG_DES_MAC4_PKCS5, ALG_DES_MAC8_ISO9797_1_M1_ALG3, ALG_DES_MAC8_ISO9797_1_M2_ALG3, ALG_DES_MAC8_ISO9797_M1, ALG_DES_MAC8_ISO9797_M2, ALG_DES_MAC8_NOPAD, ALG_DES_MAC8_PKCS5, ALG_DSA_SHA, ALG_ECDSA_SHA, ALG_ECDSA_SHA_224, ALG_ECDSA_SHA_256, ALG_ECDSA_SHA_384, ALG_ECDSA_SHA_512, ALG_HMAC_MD5, ALG_HMAC_RIPEMD160, ALG_HMAC_SHA_256, ALG_HMAC_SHA_384, ALG_HMAC_SHA_512, ALG_HMAC_SHA1, ALG_KOREAN_SEED_MAC_NOPAD, ALG_RSA_MD5_PKCS1, ALG_RSA_MD5_PKCS1_PSS, ALG_RSA_MD5_RFC2409, ALG_RSA_RIPEMD160_ISO9796, ALG_RSA_RIPEMD160_ISO9796_MR, ALG_RSA_RIPEMD160_PKCS1, ALG_RSA_RIPEMD160_PKCS1_PSS, ALG_RSA_SHA_224_PKCS1, ALG_RSA_SHA_224_PKCS1_PSS, ALG_RSA_SHA_256_PKCS1, ALG_RSA_SHA_256_PKCS1_PSS, ALG_RSA_SHA_384_PKCS1, ALG_RSA_SHA_384_PKCS1_PSS, ALG_RSA_SHA_512_PKCS1, ALG_RSA_SHA_512_PKCS1_PSS, ALG_RSA_SHA_ISO9796, ALG_RSA_SHA_ISO9796_MR, ALG_RSA_SHA_PKCS1, ALG_RSA_SHA_PKCS1_PSS, ALG_RSA_SHA_RFC2409, MODE_SIGN, MODE_VERIFY, SIG_CIPHER_AES_CMAC128, SIG_CIPHER_AES_MAC128, SIG_CIPHER_DES_MAC4, SIG_CIPHER_DES_MAC8, SIG_CIPHER_DSA, SIG_CIPHER_ECDSA, SIG_CIPHER_ECDSA_PLAIN, SIG_CIPHER_HMAC, SIG_CIPHER_KOREAN_SEED_MAC, SIG_CIPHER_RSA| Constructor and Description |
|---|
SymmetricSignatureImpl(byte algorithm) |
| Modifier and Type | Method and Description |
|---|---|
byte |
getAlgorithm() |
byte |
getCipherAlgorithm() |
short |
getLength() |
byte |
getMessageDigestAlgorithm() |
byte |
getPaddingAlgorithm() |
void |
init(javacard.security.Key theKey,
byte theMode) |
void |
init(javacard.security.Key theKey,
byte theMode,
byte[] bArray,
short bOff,
short bLen) |
void |
setInitialDigest(byte[] bytes,
short s,
short s1,
byte[] bytes1,
short s2,
short s3) |
short |
sign(byte[] inBuff,
short inOffset,
short inLength,
byte[] sigBuff,
short sigOffset) |
short |
signPreComputedHash(byte[] bytes,
short s,
short s1,
byte[] bytes1,
short s2) |
void |
update(byte[] inBuff,
short inOffset,
short inLength) |
boolean |
verify(byte[] inBuff,
short inOffset,
short inLength,
byte[] sigBuff,
short sigOffset,
short sigLength) |
boolean |
verifyPreComputedHash(byte[] bytes,
short s,
short s1,
byte[] bytes1,
short s2,
short s3) |
public void init(javacard.security.Key theKey,
byte theMode)
throws javacard.security.CryptoException
init in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic void init(javacard.security.Key theKey,
byte theMode,
byte[] bArray,
short bOff,
short bLen)
throws javacard.security.CryptoException
init in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic short getLength()
throws javacard.security.CryptoException
getLength in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic byte getAlgorithm()
getAlgorithm in class javacard.security.Signaturepublic void update(byte[] inBuff,
short inOffset,
short inLength)
throws javacard.security.CryptoException
update in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic short sign(byte[] inBuff,
short inOffset,
short inLength,
byte[] sigBuff,
short sigOffset)
throws javacard.security.CryptoException
sign in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic boolean verify(byte[] inBuff,
short inOffset,
short inLength,
byte[] sigBuff,
short sigOffset,
short sigLength)
throws javacard.security.CryptoException
verify in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic void setInitialDigest(byte[] bytes,
short s,
short s1,
byte[] bytes1,
short s2,
short s3)
throws javacard.security.CryptoException
setInitialDigest in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic short signPreComputedHash(byte[] bytes,
short s,
short s1,
byte[] bytes1,
short s2)
throws javacard.security.CryptoException
signPreComputedHash in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic boolean verifyPreComputedHash(byte[] bytes,
short s,
short s1,
byte[] bytes1,
short s2,
short s3)
throws javacard.security.CryptoException
verifyPreComputedHash in class javacard.security.Signaturejavacard.security.CryptoExceptionpublic byte getPaddingAlgorithm()
getPaddingAlgorithm in class javacard.security.Signaturepublic byte getMessageDigestAlgorithm()
getMessageDigestAlgorithm in class javacard.security.Signaturepublic byte getCipherAlgorithm()
getCipherAlgorithm in class javacard.security.Signature