Class AsymmetricGOST3410PrivateKey
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key<GOST3410DomainParameters>
org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410PrivateKey
- All Implemented Interfaces:
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
ecAcceptable, fpAcceptable
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricGOST3410PrivateKey
(Algorithm algorithm, byte[] enc) AsymmetricGOST3410PrivateKey
(Algorithm algorithm, PrivateKeyInfo privateKeyInfo) AsymmetricGOST3410PrivateKey
(Algorithm algorithm, GOST3410Parameters<GOST3410DomainParameters> params, BigInteger x) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
boolean
Return true if o is an equivalent key to this.final Algorithm
Return the algorithm this GOST R 34.10 key is for.final byte[]
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.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.getX()
int
hashCode()
Return the hashCode for the key.boolean
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key
checkApprovedOnlyModeStatus, isThreadCorrectMode, zeroize
-
Constructor Details
-
AsymmetricGOST3410PrivateKey
public AsymmetricGOST3410PrivateKey(Algorithm algorithm, GOST3410Parameters<GOST3410DomainParameters> params, BigInteger x) -
AsymmetricGOST3410PrivateKey
-
AsymmetricGOST3410PrivateKey
-
-
Method Details
-
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
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
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceDestroyable
-
hashCode
public int hashCode()Description copied from interface:Key
Return the hashCode for the key. -
equals
Description copied from interface:Key
Return true if o is an equivalent key to this.
-