Class AsymmetricECGOST3410PrivateKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key<ECDomainParameters>
-
- org.bouncycastle.crypto.asymmetric.AsymmetricECGOST3410PrivateKey
-
- All Implemented Interfaces:
javax.security.auth.Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
public final class AsymmetricECGOST3410PrivateKey extends AsymmetricGOST3410Key<ECDomainParameters> implements AsymmetricPrivateKey
Class for keys for GOST R 34.10-2001 (ECGOST) private keys.
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key
domainParameters
-
-
Constructor Summary
Constructors Constructor Description AsymmetricECGOST3410PrivateKey(Algorithm algorithm, byte[] enc)
AsymmetricECGOST3410PrivateKey(Algorithm algorithm, PrivateKeyInfo privateKeyInfo)
AsymmetricECGOST3410PrivateKey(Algorithm algorithm, GOST3410Parameters<ECDomainParameters> params, java.math.BigInteger x)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
boolean
equals(java.lang.Object o)
Return true if o is an equivalent key to this.protected void
finalize()
Algorithm
getAlgorithm()
Return the algorithm this GOST R 34.10 key is for.byte[]
getEncoded()
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.GOST3410Parameters<ECDomainParameters>
getParameters()
Return the domain parameters associated with this key.These will either be for GOST R 34.10-1994 or GOST R 34.10-2001 depending on the key type.java.math.BigInteger
getS()
int
hashCode()
Return the hashCode for the key.boolean
isDestroyed()
-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key
checkApprovedOnlyModeStatus, zeroize
-
-
-
-
Constructor Detail
-
AsymmetricECGOST3410PrivateKey
public AsymmetricECGOST3410PrivateKey(Algorithm algorithm, GOST3410Parameters<ECDomainParameters> params, java.math.BigInteger x)
-
AsymmetricECGOST3410PrivateKey
public AsymmetricECGOST3410PrivateKey(Algorithm algorithm, byte[] enc)
-
AsymmetricECGOST3410PrivateKey
public AsymmetricECGOST3410PrivateKey(Algorithm algorithm, PrivateKeyInfo privateKeyInfo)
-
-
Method Detail
-
getEncoded
public final byte[] getEncoded()
Description copied from interface:AsymmetricKey
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncoded
in interfaceAsymmetricKey
- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
getAlgorithm
public final Algorithm getAlgorithm()
Return the algorithm this GOST R 34.10 key is for.- Specified by:
getAlgorithm
in interfaceKey
- Overrides:
getAlgorithm
in classAsymmetricGOST3410Key<ECDomainParameters>
- Returns:
- the key's algorithm.
-
getParameters
public final GOST3410Parameters<ECDomainParameters> getParameters()
Return the domain parameters associated with this key.These will either be for GOST R 34.10-1994 or GOST R 34.10-2001 depending on the key type.- Overrides:
getParameters
in classAsymmetricGOST3410Key<ECDomainParameters>
- Returns:
- the GOST3410 domain parameters.
-
getS
public java.math.BigInteger getS()
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interfacejavax.security.auth.Destroyable
-
hashCode
public int hashCode()
Description copied from interface:Key
Return the hashCode for the key.
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:Key
Return true if o is an equivalent key to this.
-
-