public class DSAKeyImpl extends KeyImpl implements javacard.security.DSAKey
DSAPublicKeyImpl/DSAPrivateKeyImpl
on BouncyCastle CryptoAPI.DSAKey| Modifier and Type | Field and Description |
|---|---|
protected ByteContainer |
g |
protected boolean |
isPrivate |
protected ByteContainer |
p |
protected ByteContainer |
q |
| Constructor and Description |
|---|
DSAKeyImpl(byte keyType,
short keySize)
Construct not-initialized dsa key
|
DSAKeyImpl(org.bouncycastle.crypto.params.DSAKeyParameters params)
Construct and initialize dsa key with DSAKeyParameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearKey() |
short |
getG(byte[] buffer,
short offset) |
org.bouncycastle.crypto.KeyGenerationParameters |
getKeyGenerationParameters(SecureRandom rnd)
Get
DSAKeyGenerationParameters |
short |
getP(byte[] buffer,
short offset) |
org.bouncycastle.crypto.CipherParameters |
getParameters()
Get
DSAKeyParameters |
short |
getQ(byte[] buffer,
short offset) |
boolean |
isInitialized() |
void |
setG(byte[] buffer,
short offset,
short length) |
void |
setP(byte[] buffer,
short offset,
short length) |
void |
setParameters(org.bouncycastle.crypto.CipherParameters params)
Set cipher key for use with BouncyCastle Crypto API
|
void |
setQ(byte[] buffer,
short offset,
short length) |
protected ByteContainer p
protected ByteContainer q
protected ByteContainer g
protected boolean isPrivate
public DSAKeyImpl(byte keyType,
short keySize)
keyType - - key typekeySize - - key size in bitsKeyPair,
KeyBuilderpublic DSAKeyImpl(org.bouncycastle.crypto.params.DSAKeyParameters params)
params - key params from BouncyCastle APIKeyPair,
DSAKeyParameterspublic void setParameters(org.bouncycastle.crypto.CipherParameters params)
KeyWithParameterssetParameters in interface KeyWithParametersparams - key parameterspublic void clearKey()
clearKey in interface javacard.security.Keypublic boolean isInitialized()
isInitialized in interface javacard.security.Keypublic void setP(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setP in interface javacard.security.DSAKeyjavacard.security.CryptoExceptionpublic void setQ(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setQ in interface javacard.security.DSAKeyjavacard.security.CryptoExceptionpublic void setG(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setG in interface javacard.security.DSAKeyjavacard.security.CryptoExceptionpublic short getP(byte[] buffer,
short offset)
getP in interface javacard.security.DSAKeypublic short getQ(byte[] buffer,
short offset)
getQ in interface javacard.security.DSAKeypublic short getG(byte[] buffer,
short offset)
getG in interface javacard.security.DSAKeypublic org.bouncycastle.crypto.CipherParameters getParameters()
DSAKeyParametersgetParameters in interface KeyWithParametersDSAKeyParameterspublic org.bouncycastle.crypto.KeyGenerationParameters getKeyGenerationParameters(SecureRandom rnd)
DSAKeyGenerationParametersgetKeyGenerationParameters in interface KeyWithParametersrnd - Secure Random Generator