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 TypeMethodDescriptionvoiddestroy()booleanReturn true if o is an equivalent key to this.final AlgorithmReturn 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 DSTU4145ParametersReturn the domain parameters for this DSTU4145 key.final BigIntegergetS()inthashCode()Return the hashCode for the key.booleanMethods 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: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
Return the algorithm this DSTU4145 key is for.- Specified by:
getAlgorithmin interfaceKey- Overrides:
getAlgorithmin classAsymmetricDSTU4145Key- Returns:
- the key's algorithm.
-
getParameters
Return the domain parameters for this DSTU4145 key.- Overrides:
getParametersin classAsymmetricDSTU4145Key- Returns:
- the DSTU4145 domain parameters.
-
getS
-
destroy
public void destroy()- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
equals
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.
-