Class AsymmetricGOST3410PrivateKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key<GOST3410DomainParameters>
-
- org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410PrivateKey
-
- All Implemented Interfaces:
javax.security.auth.Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
public final class AsymmetricGOST3410PrivateKey extends AsymmetricGOST3410Key<GOST3410DomainParameters> implements AsymmetricPrivateKey
Class for keys for GOST R 34.10-1994 private keys.
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key
domainParameters
-
-
Constructor Summary
Constructors Constructor Description AsymmetricGOST3410PrivateKey(Algorithm algorithm, byte[] enc)
AsymmetricGOST3410PrivateKey(Algorithm algorithm, PrivateKeyInfo privateKeyInfo)
AsymmetricGOST3410PrivateKey(Algorithm algorithm, GOST3410Parameters<GOST3410DomainParameters> 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<GOST3410DomainParameters>
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
getX()
int
hashCode()
Return the hashCode for the key.boolean
isDestroyed()
-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key
checkApprovedOnlyModeStatus, zeroize
-
-
-
-
Constructor Detail
-
AsymmetricGOST3410PrivateKey
public AsymmetricGOST3410PrivateKey(Algorithm algorithm, GOST3410Parameters<GOST3410DomainParameters> params, java.math.BigInteger x)
-
AsymmetricGOST3410PrivateKey
public AsymmetricGOST3410PrivateKey(Algorithm algorithm, byte[] enc)
-
AsymmetricGOST3410PrivateKey
public AsymmetricGOST3410PrivateKey(Algorithm algorithm, PrivateKeyInfo privateKeyInfo)
-
-
Method Detail
-
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<GOST3410DomainParameters>
- Returns:
- the key's algorithm.
-
getParameters
public final GOST3410Parameters<GOST3410DomainParameters> 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<GOST3410DomainParameters>
- Returns:
- the GOST3410 domain parameters.
-
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.
-
getX
public java.math.BigInteger getX()
-
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.
-
-