Class BCMLDSAPrivateKey
- java.lang.Object
-
- org.bouncycastle.jcajce.provider.asymmetric.mldsa.BCMLDSAPrivateKey
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Key,java.security.PrivateKey,javax.security.auth.Destroyable,MLDSAKey,MLDSAPrivateKey
public class BCMLDSAPrivateKey extends java.lang.Object implements MLDSAPrivateKey
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BCMLDSAPrivateKey(PrivateKeyInfo keyInfo)BCMLDSAPrivateKey(MLDSAPrivateKeyParameters params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Compare this ML-DSA private key with another object.java.lang.StringgetAlgorithm()byte[]getEncoded()java.lang.StringgetFormat()MLDSAParameterSpecgetParameterSpec()Return the parameters for this key.MLDSAPublicKeygetPublicKey()Return the public key corresponding to this private key.inthashCode()java.lang.StringtoString()
-
-
-
Constructor Detail
-
BCMLDSAPrivateKey
public BCMLDSAPrivateKey(MLDSAPrivateKeyParameters params)
-
BCMLDSAPrivateKey
public BCMLDSAPrivateKey(PrivateKeyInfo keyInfo) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
Compare this ML-DSA private key with another object.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- the other object- Returns:
- the result of the comparison
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getAlgorithm
public final java.lang.String getAlgorithm()
- Specified by:
getAlgorithmin interfacejava.security.Key- Returns:
- name of the algorithm
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncodedin interfacejava.security.Key
-
getPublicKey
public MLDSAPublicKey getPublicKey()
Description copied from interface:MLDSAPrivateKeyReturn the public key corresponding to this private key.- Specified by:
getPublicKeyin interfaceMLDSAPrivateKey- Returns:
- a ML-DSA Public Key
-
getParameterSpec
public MLDSAParameterSpec getParameterSpec()
Description copied from interface:MLDSAKeyReturn the parameters for this key.- Specified by:
getParameterSpecin interfaceMLDSAKey- Returns:
- a MLDSAParameterSpec
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin interfacejava.security.Key
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-