Class AsymmetricDSTU4145PrivateKey
java.lang.Object
org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145Key
org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145PrivateKey
- All Implemented Interfaces:
Destroyable
,AsymmetricKey
,AsymmetricPrivateKey
,Key
public final class AsymmetricDSTU4145PrivateKey
extends AsymmetricDSTU4145Key
implements AsymmetricPrivateKey
Class for DSTU-4145 private keys.
-
Field Summary
Fields inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145Key
dstu4145Identifier
-
Constructor Summary
ConstructorsConstructorDescriptionAsymmetricDSTU4145PrivateKey
(Algorithm ecAlg, byte[] encoding) AsymmetricDSTU4145PrivateKey
(Algorithm ecAlg, PrivateKeyInfo privateKeyInfo) AsymmetricDSTU4145PrivateKey
(Algorithm algorithm, DSTU4145Parameters parameters, BigInteger s) -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
boolean
Return true if o is an equivalent key to this.final Algorithm
Return the algorithm this DSTU4145 key is for.final byte[]
Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.final DSTU4145Parameters
Return the domain parameters for this DSTU4145 key.final BigInteger
getS()
int
hashCode()
Return the hashCode for the key.boolean
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145Key
checkApprovedOnlyModeStatus, isThreadCorrectMode, reverseBytes, zeroize
-
Constructor Details
-
AsymmetricDSTU4145PrivateKey
public AsymmetricDSTU4145PrivateKey(Algorithm algorithm, DSTU4145Parameters parameters, BigInteger s) -
AsymmetricDSTU4145PrivateKey
-
AsymmetricDSTU4145PrivateKey
-
-
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 DSTU4145 key is for.- Specified by:
getAlgorithm
in interfaceKey
- Overrides:
getAlgorithm
in classAsymmetricDSTU4145Key
- Returns:
- the key's algorithm.
-
getParameters
Return the domain parameters for this DSTU4145 key.- Overrides:
getParameters
in classAsymmetricDSTU4145Key
- Returns:
- the DSTU4145 domain parameters.
-
getS
-
destroy
public void destroy()- Specified by:
destroy
in interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyed
in interfaceDestroyable
-
equals
Description copied from interface:Key
Return true if o is an equivalent key to this. -
hashCode
public int hashCode()Description copied from interface:Key
Return the hashCode for the key.
-