Class BCECGOST3410_2012PrivateKey
java.lang.Object
org.bouncycastle.jcajce.provider.asymmetric.ecgost12.BCECGOST3410_2012PrivateKey
- All Implemented Interfaces:
Serializable
,ECKey
,ECPrivateKey
,Key
,PrivateKey
,Destroyable
,ECKey
,ECPointEncoder
,ECPrivateKey
,PKCS12BagAttributeCarrier
public class BCECGOST3410_2012PrivateKey
extends Object
implements ECPrivateKey, ECPrivateKey, PKCS12BagAttributeCarrier, ECPointEncoder
Represent two kind of GOST34.10 2012 PrivateKeys: with 256 and 512 size
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
BCECGOST3410_2012PrivateKey
(String algorithm, ECPrivateKeyParameters params) BCECGOST3410_2012PrivateKey
(String algorithm, ECPrivateKeyParameters params, BCECGOST3410_2012PublicKey pubKey, ECParameterSpec spec) BCECGOST3410_2012PrivateKey
(String algorithm, ECPrivateKeyParameters params, BCECGOST3410_2012PublicKey pubKey, ECParameterSpec spec) -
Method Summary
Modifier and TypeMethodDescriptionboolean
getD()
return the private value D.byte[]
Return a PKCS8 representation of the key.return the encoding format we produce in getEncoded().return a parameter specification representing the EC domain parameters for the key.getS()
int
hashCode()
void
setBagAttribute
(ASN1ObjectIdentifier oid, ASN1Encodable attribute) void
setPointFormat
(String style) Set the formatting for encoding of points.toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
BCECGOST3410_2012PrivateKey
protected BCECGOST3410_2012PrivateKey() -
BCECGOST3410_2012PrivateKey
-
BCECGOST3410_2012PrivateKey
-
BCECGOST3410_2012PrivateKey
-
BCECGOST3410_2012PrivateKey
-
BCECGOST3410_2012PrivateKey
public BCECGOST3410_2012PrivateKey(String algorithm, ECPrivateKeyParameters params, BCECGOST3410_2012PublicKey pubKey, ECParameterSpec spec) -
BCECGOST3410_2012PrivateKey
public BCECGOST3410_2012PrivateKey(String algorithm, ECPrivateKeyParameters params, BCECGOST3410_2012PublicKey pubKey, ECParameterSpec spec) -
BCECGOST3410_2012PrivateKey
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceKey
-
getFormat
return the encoding format we produce in getEncoded(). -
getEncoded
public byte[] getEncoded()Return a PKCS8 representation of the key. The sequence returned represents a full PrivateKeyInfo object.- Specified by:
getEncoded
in interfaceKey
- Returns:
- a PKCS8 representation of the key.
-
getParams
-
getParameters
Description copied from interface:ECKey
return a parameter specification representing the EC domain parameters for the key.- Specified by:
getParameters
in interfaceECKey
-
getS
- Specified by:
getS
in interfaceECPrivateKey
-
getD
Description copied from interface:ECPrivateKey
return the private value D.- Specified by:
getD
in interfaceECPrivateKey
-
setBagAttribute
- Specified by:
setBagAttribute
in interfacePKCS12BagAttributeCarrier
-
getBagAttribute
- Specified by:
getBagAttribute
in interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
- Specified by:
getBagAttributeKeys
in interfacePKCS12BagAttributeCarrier
-
setPointFormat
Description copied from interface:ECPointEncoder
Set the formatting for encoding of points. If the String "UNCOMPRESSED" is passed in point compression will not be used. If the String "COMPRESSED" is passed point compression will be used. The default is "UNCOMPRESSED".- Specified by:
setPointFormat
in interfaceECPointEncoder
- Parameters:
style
- the style to use.
-
equals
-
hashCode
public int hashCode() -
toString
-