Class AsymmetricDSTU4145PrivateKey
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145Key
-
- org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145PrivateKey
-
- All Implemented Interfaces:
javax.security.auth.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, parameters
-
-
Constructor Summary
Constructors Constructor Description AsymmetricDSTU4145PrivateKey(Algorithm ecAlg, byte[] encoding)AsymmetricDSTU4145PrivateKey(Algorithm ecAlg, PrivateKeyInfo privateKeyInfo)AsymmetricDSTU4145PrivateKey(Algorithm algorithm, DSTU4145Parameters parameters, java.math.BigInteger s)
-
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 DSTU4145 key is for.byte[]getEncoded()Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.DSTU4145ParametersgetParameters()Return the domain parameters for this DSTU4145 key.java.math.BigIntegergetS()inthashCode()Return the hashCode for the key.booleanisDestroyed()-
Methods inherited from class org.bouncycastle.crypto.asymmetric.AsymmetricDSTU4145Key
checkApprovedOnlyModeStatus, reverseBytes, zeroize
-
-
-
-
Constructor Detail
-
AsymmetricDSTU4145PrivateKey
public AsymmetricDSTU4145PrivateKey(Algorithm algorithm, DSTU4145Parameters parameters, java.math.BigInteger s)
-
AsymmetricDSTU4145PrivateKey
public AsymmetricDSTU4145PrivateKey(Algorithm ecAlg, byte[] encoding)
-
AsymmetricDSTU4145PrivateKey
public AsymmetricDSTU4145PrivateKey(Algorithm ecAlg, PrivateKeyInfo privateKeyInfo)
-
-
Method Detail
-
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.
-
getAlgorithm
public final Algorithm getAlgorithm()
Return the algorithm this DSTU4145 key is for.- Specified by:
getAlgorithmin interfaceKey- Overrides:
getAlgorithmin classAsymmetricDSTU4145Key- Returns:
- the key's algorithm.
-
getParameters
public final DSTU4145Parameters getParameters()
Return the domain parameters for this DSTU4145 key.- Overrides:
getParametersin classAsymmetricDSTU4145Key- Returns:
- the DSTU4145 domain parameters.
-
getS
public final java.math.BigInteger getS()
-
destroy
public void destroy()
- Specified by:
destroyin interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyedin interfacejavax.security.auth.Destroyable
-
equals
public boolean equals(java.lang.Object o)
Description copied from interface:KeyReturn true if o is an equivalent key to this.
-
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
-
-