|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.licel.jcardsim.crypto.KeyImpl com.licel.jcardsim.crypto.DSAKeyImpl com.licel.jcardsim.crypto.DSAPublicKeyImpl
public class DSAPublicKeyImpl
Implementation DSAPublicKey
based
on BouncyCastle CryptoAPI
DSAPublicKey
,
DSAPublicKeyParameters
Field Summary | |
---|---|
protected ByteContainer |
y
|
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 | |
---|---|
DSAPublicKeyImpl(org.bouncycastle.crypto.params.DSAPublicKeyParameters params)
Construct and initialize ecc key with DSAPublicKeyParameters. |
|
DSAPublicKeyImpl(short keySize)
Construct not-initialized dsa public key |
Method Summary | |
---|---|
void |
clearKey()
Clears the key and sets its initialized state to false. |
org.bouncycastle.crypto.CipherParameters |
getParameters()
Get DSAKeyParameters |
short |
getY(byte[] buffer,
short offset)
Returns the value of the key in plain text. |
boolean |
isInitialized()
Reports the initialized state of the key. |
void |
setY(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 y
Constructor Detail |
---|
public DSAPublicKeyImpl(short keySize)
size
- key size it bitsKeyBuilder
public DSAPublicKeyImpl(org.bouncycastle.crypto.params.DSAPublicKeyParameters params)
params
- key params from BouncyCastle APIKeyPair
,
DSAPublicKeyParameters
Method Detail |
---|
public void setY(byte[] buffer, short offset, short length) throws CryptoException
DSAPublicKey
Note:
javacardx.crypto.KeyEncryption
interface and the Cipher
object specified via setKeyCipher()
is not null
, the key value is decrypted using the Cipher
object.
setY
in interface DSAPublicKey
buffer
- the input bufferoffset
- the offset into the input buffer at which the key value beginslength
- the length of the key value
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 getY(byte[] buffer, short offset)
DSAPublicKey
getY
in interface DSAPublicKey
buffer
- the output bufferoffset
- the offset into the input buffer at which the key value starts
Key
public boolean isInitialized()
Key
A 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 Key
isInitialized
in class DSAKeyImpl
true
if the key has been initializedpublic void clearKey()
Key
clearKey
in interface Key
clearKey
in class DSAKeyImpl
public org.bouncycastle.crypto.CipherParameters getParameters()
DSAKeyImpl
DSAKeyParameters
getParameters
in interface KeyWithParameters
getParameters
in class DSAKeyImpl
DSAKeyParameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |