Class AsymmetricECGOST3410PrivateKey
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key<ECDomainParameters>
org.bouncycastle.crypto.asymmetric.AsymmetricECGOST3410PrivateKey
- All Implemented Interfaces:
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
ecAcceptable, fpAcceptable
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricECGOST3410PrivateKey
(Algorithm algorithm, byte[] enc) AsymmetricECGOST3410PrivateKey
(Algorithm algorithm, PrivateKeyInfo privateKeyInfo) AsymmetricECGOST3410PrivateKey
(Algorithm algorithm, GOST3410Parameters<ECDomainParameters> 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.getS()
int
hashCode()
Return the hashCode for the key.boolean
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricGOST3410Key
checkApprovedOnlyModeStatus, isThreadCorrectMode, zeroize
-
Constructor Details
-
AsymmetricECGOST3410PrivateKey
public AsymmetricECGOST3410PrivateKey(Algorithm algorithm, GOST3410Parameters<ECDomainParameters> params, BigInteger x) -
AsymmetricECGOST3410PrivateKey
-
AsymmetricECGOST3410PrivateKey
-
-
Method Details
-
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
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
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
-
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.
-