public class ECPrivateKeyImpl extends ECKeyImpl implements javacard.security.ECPrivateKey
ECPrivateKey based
on BouncyCastle CryptoAPI.ECPrivateKey,
ECPrivateKeyParameters| Modifier and Type | Field and Description |
|---|---|
protected ByteContainer |
s |
| Constructor and Description |
|---|
ECPrivateKeyImpl(byte keyType,
short keySize)
Construct not-initialized ecc private key
|
ECPrivateKeyImpl(org.bouncycastle.crypto.params.ECPrivateKeyParameters params)
Construct and initialize ecc key with ECPrivateKeyParameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearKey() |
org.bouncycastle.crypto.CipherParameters |
getParameters()
Get
ECPrivateKeyParameters |
short |
getS(byte[] buffer,
short offset) |
boolean |
isInitialized() |
void |
setParameters(org.bouncycastle.crypto.CipherParameters params)
Set cipher key for use with BouncyCastle Crypto API
|
void |
setS(byte[] buffer,
short offset,
short length) |
copyDomainParametersFrom, getA, getB, getDomainParameters, getField, getG, getK, getKeyGenerationParameters, getR, isDomainParametersInitialized, setA, setB, setFieldF2M, setFieldF2M, setFieldFP, setG, setK, setRprotected ByteContainer s
public ECPrivateKeyImpl(byte keyType,
short keySize)
keyType - key typekeySize - key size it bitsKeyBuilderpublic ECPrivateKeyImpl(org.bouncycastle.crypto.params.ECPrivateKeyParameters params)
params - key params from BouncyCastle APIKeyPair,
ECPrivateKeyParameterspublic void setParameters(org.bouncycastle.crypto.CipherParameters params)
KeyWithParameterssetParameters in interface KeyWithParametersparams - key parameterspublic void setS(byte[] buffer,
short offset,
short length)
throws javacard.security.CryptoException
setS in interface javacard.security.ECPrivateKeyjavacard.security.CryptoExceptionpublic short getS(byte[] buffer,
short offset)
throws javacard.security.CryptoException
getS in interface javacard.security.ECPrivateKeyjavacard.security.CryptoExceptionpublic boolean isInitialized()
isInitialized in interface javacard.security.Keypublic void clearKey()
public org.bouncycastle.crypto.CipherParameters getParameters()
ECPrivateKeyParametersgetParameters in interface KeyWithParametersECPrivateKeyParameters