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
ConstructorsModifierConstructorDescriptionprotectedBCECGOST3410_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 TypeMethodDescriptionbooleangetD()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()booleaninthashCode()voidsetBagAttribute(ASN1ObjectIdentifier oid, ASN1Encodable attribute) voidsetFriendlyName(String friendlyName) voidsetPointFormat(String style) Set the formatting for encoding of points.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getAlgorithmin 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:
getEncodedin interfaceKey- Returns:
- a PKCS8 representation of the key.
-
getParams
-
getParameters
Description copied from interface:ECKeyreturn a parameter specification representing the EC domain parameters for the key.- Specified by:
getParametersin interfaceECKey
-
getS
- Specified by:
getSin interfaceECPrivateKey
-
getD
Description copied from interface:ECPrivateKeyreturn the private value D.- Specified by:
getDin interfaceECPrivateKey
-
setBagAttribute
- Specified by:
setBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttribute
- Specified by:
getBagAttributein interfacePKCS12BagAttributeCarrier
-
getBagAttributeKeys
- Specified by:
getBagAttributeKeysin interfacePKCS12BagAttributeCarrier
-
hasFriendlyName
public boolean hasFriendlyName()- Specified by:
hasFriendlyNamein interfacePKCS12BagAttributeCarrier
-
setFriendlyName
- Specified by:
setFriendlyNamein interfacePKCS12BagAttributeCarrier
-
setPointFormat
Description copied from interface:ECPointEncoderSet 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:
setPointFormatin interfaceECPointEncoder- Parameters:
style- the style to use.
-
equals
-
hashCode
public int hashCode() -
toString
-