Smart Card Solution
User Manual
- R502 Manual
JavaCard API Samples
- Algorithm
Java Card Specification
Knowledge Sharing
Smart Card Solution
User Manual
JavaCard API Samples
Java Card Specification
Knowledge Sharing
javacard.security
All Superinterfaces: DSAKey , Key , PrivateKey
The DSAPrivateKey interface is used to sign data using the DSA algorithm. An implementation of DSAPrivateKey interface must also implement the DSAKey interface methods. When all four components of the key (X,P,Q,G) are set, the key is initialized and ready for use.
See Also:DSAPublicKey , KeyBuilder , Signature , javacardx.crypto.KeyEncryption
Method Summary | |
---|---|
short | getX (byte[] buffer,short offset) Returns the value of the key in plain text. |
void | setX (byte[] buffer,short offset,short length) Sets the value of the key. |
Methods inherited from interface javacard.security.Key |
---|
clearKey , getSize , getType , isInitialized |
Method Detail |
---|
void setX(byte[] buffer, short offset, short length) throws CryptoException
Sets the value of the key. When the base, prime and subprime parameters are initialized
and the key value is set, the key is ready for use.
The plain text data format is big-endian and right-aligned (the least significant bit is the least significant
bit of last byte). Input key data is copied into the internal representation.
Note:
Parameters:buffer - the input buffer
offset - the offset into the input buffer at which the modulus value begins
length - the length of the modulus
Throws:
CryptoException - with the following reason code:
short getX(byte[] buffer, short offset)
Returns the value of the key in plain text. The data format is big-endian and right-aligned (the least significant bit is the least significant bit of last byte).
Parameters:buffer - the output buffer
offset - the offset into the output buffer at which the key value starts
Returns:the byte length of the key value returned
Throws:
CryptoException - with the following reason code:
See Also:Key