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 voiddestroy()booleanequals(java.lang.Object o)Return true if o is an equivalent key to this.protected voidfinalize()AlgorithmgetAlgorithm()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.BigIntegergetX()inthashCode()Return the hashCode for the key.booleanisDestroyed()-
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:
getAlgorithmin interfaceKey- Overrides:
getAlgorithmin 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:
getParametersin classAsymmetricGOST3410Key<GOST3410DomainParameters>- Returns:
- the GOST3410 domain parameters.
-
getEncoded
public final byte[] getEncoded()
Description copied from interface:AsymmetricKeyReturn an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.- Specified by:
getEncodedin interfaceAsymmetricKey- Returns:
- an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
-
getX
public java.math.BigInteger getX()
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfacejavax.security.auth.Destroyable
-
hashCode
public int hashCode()
Description copied from interface:KeyReturn the hashCode for the key.
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalizein classjava.lang.Object- Throws:
java.lang.Throwable
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:KeyReturn true if o is an equivalent key to this.
-
-