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 void
destroy()
boolean
equals(java.lang.Object o)
Return true if o is an equivalent key to this.protected void
finalize()
Algorithm
getAlgorithm()
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.DSTU4145Parameters
getParameters()
Return the domain parameters for this DSTU4145 key.java.math.BigInteger
getS()
int
hashCode()
Return the hashCode for the key.boolean
isDestroyed()
-
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: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
public final Algorithm getAlgorithm()
Return the algorithm this DSTU4145 key is for.- Specified by:
getAlgorithm
in interfaceKey
- Overrides:
getAlgorithm
in classAsymmetricDSTU4145Key
- Returns:
- the key's algorithm.
-
getParameters
public final DSTU4145Parameters getParameters()
Return the domain parameters for this DSTU4145 key.- Overrides:
getParameters
in classAsymmetricDSTU4145Key
- Returns:
- the DSTU4145 domain parameters.
-
getS
public final java.math.BigInteger getS()
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.security.auth.Destroyable
-
isDestroyed
public boolean isDestroyed()
- Specified by:
isDestroyed
in interfacejavax.security.auth.Destroyable
-
equals
public boolean equals(java.lang.Object o)
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.
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
-