public final class ECPrivateKey
extends com.ibm.security.pkcs8.PrivateKeyInfo
implements java.security.interfaces.ECPrivateKey, java.security.interfaces.ECKey, java.io.Serializable
EXPLICIT TAGS ECPrivateKey ::= SEQUENCE { version INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1), privateKey OCTET STRING, parameters [0] ECDomainParameters {{ SECGCurveNames }} OPTIONAL, publicKey [1] BIT STRING OPTIONAL }We currently ignore the optional parameters and publicKey fields. We require that the parameters are encoded as part of the AlgorithmIdentifier, not in the private key structure.
Constructor and Description |
---|
ECPrivateKey(java.math.BigInteger s,
java.security.spec.ECParameterSpec params)
Construct a key from its components.
|
ECPrivateKey(byte[] encoded)
Construct a key from its encoding.
|
Modifier and Type | Method and Description |
---|---|
java.security.spec.ECParameterSpec |
getParams() |
java.math.BigInteger |
getS() |
void |
zeroize()
This function zeroizes the key so that it isn't in memory
|
addAttribute, addAttributes, clone, encode, equals, getAlgorithm, getAlgorithmId, getAttribute, getAttributes, getEncoded, getFormat, getKeyBytes, hasAttribute, hasAttributes, hashCode, parseKey, parseKey, toString
public ECPrivateKey(byte[] encoded) throws java.security.InvalidKeyException
encoded
- java.security.InvalidKeyException
public ECPrivateKey(java.math.BigInteger s, java.security.spec.ECParameterSpec params) throws java.security.InvalidKeyException, java.security.spec.InvalidParameterSpecException
s
- params
- java.security.InvalidKeyException
java.security.spec.InvalidParameterSpecException
public java.math.BigInteger getS()
getS
in interface java.security.interfaces.ECPrivateKey
public java.security.spec.ECParameterSpec getParams()
getParams
in interface java.security.interfaces.ECKey
public void zeroize()
© Portions Copyright 2003, 2012 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2012, Oracle and/or its affiliates. All rights reserved.