|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.licel.jcardsim.crypto.KeyImpl
com.licel.jcardsim.crypto.DSAKeyImpl
com.licel.jcardsim.crypto.DSAPrivateKeyImpl
public class DSAPrivateKeyImpl
Implementation DSAPrivateKey based
on BouncyCastle CryptoAPI
DSAPrivateKey,
DSAPrivateKeyParameters| Field Summary | |
|---|---|
protected ByteContainer |
x
|
| Fields inherited from class com.licel.jcardsim.crypto.DSAKeyImpl |
|---|
g, isPrivate, p, q |
| Fields inherited from class com.licel.jcardsim.crypto.KeyImpl |
|---|
size, type |
| Constructor Summary | |
|---|---|
DSAPrivateKeyImpl(org.bouncycastle.crypto.params.DSAPrivateKeyParameters params)
Construct and initialize dsa key with DSAPrivateKeyParameters. |
|
DSAPrivateKeyImpl(short keySize)
Construct not-initialized dsa private key |
|
| Method Summary | |
|---|---|
void |
clearKey()
Clears the key and sets its initialized state to false. |
org.bouncycastle.crypto.CipherParameters |
getParameters()
Get DSAKeyParameters |
short |
getX(byte[] buffer,
short offset)
Returns the value of the key in plain text. |
boolean |
isInitialized()
Reports the initialized state of the key. |
void |
setX(byte[] buffer,
short offset,
short length)
Sets the value of the key. |
| Methods inherited from class com.licel.jcardsim.crypto.DSAKeyImpl |
|---|
getG, getKeyGenerationParameters, getP, getQ, setG, setP, setQ |
| Methods inherited from class com.licel.jcardsim.crypto.KeyImpl |
|---|
getSize, getType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javacard.security.Key |
|---|
getSize, getType |
| Methods inherited from interface javacard.security.DSAKey |
|---|
getG, getP, getQ, setG, setP, setQ |
| Field Detail |
|---|
protected ByteContainer x
| Constructor Detail |
|---|
public DSAPrivateKeyImpl(short keySize)
size - key size it bitsKeyBuilderpublic DSAPrivateKeyImpl(org.bouncycastle.crypto.params.DSAPrivateKeyParameters params)
params - key params from BouncyCastle APIKeyPair,
DSAPrivateKeyParameters| Method Detail |
|---|
public void setX(byte[] buffer,
short offset,
short length)
throws CryptoException
DSAPrivateKeyNote:
javacardx.crypto.KeyEncryption
interface and the Cipher object specified via setKeyCipher()
is not null, the key value is decrypted using the Cipher object.
setX in interface DSAPrivateKeybuffer - the input bufferoffset - the offset into the input buffer at which the modulus value beginslength - the length of the modulus
CryptoException - with the following reason code:
CryptoException.ILLEGAL_VALUE if the input key data length is inconsistent
with the implementation or if input data decryption is required and fails.
public short getX(byte[] buffer,
short offset)
DSAPrivateKey
getX in interface DSAPrivateKeybuffer - the output bufferoffset - the offset into the output buffer at which the key value starts
Keypublic boolean isInitialized()
KeyA Key object sets its initialized state to true only when all the associated
Key object parameters have been set at least once since the time the initialized state was set to false.
A newly created Key object sets its initialized state to false. Invocation of the
clearKey() method sets the initialized state to false. A key with transient key data
sets its initialized state to false on the associated clear events.
isInitialized in interface KeyisInitialized in class DSAKeyImpltrue if the key has been initializedpublic void clearKey()
Key
clearKey in interface KeyclearKey in class DSAKeyImplpublic org.bouncycastle.crypto.CipherParameters getParameters()
DSAKeyImplDSAKeyParameters
getParameters in interface KeyWithParametersgetParameters in class DSAKeyImplDSAKeyParameters
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||