Package org.conscrypt
Class OpenSslMlKemPrivateKey
- java.lang.Object
-
- org.conscrypt.OpenSslMlKemPrivateKey
-
- All Implemented Interfaces:
java.io.Serializable,java.security.Key,java.security.PrivateKey,javax.security.auth.Destroyable
public class OpenSslMlKemPrivateKey extends java.lang.Object implements java.security.PrivateKeyAn ML-KEM private key.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private MlKemAlgorithmalgorithm(package private) static intPRIVATE_KEY_SIZE_BYTESprivate byte[]seedprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description OpenSslMlKemPrivateKey(byte[] seed, MlKemAlgorithm algorithm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()booleanequals(java.lang.Object o)java.lang.StringgetAlgorithm()byte[]getEncoded()java.lang.StringgetFormat()(package private) MlKemAlgorithmgetMlKemAlgorithm()private static byte[]getPkcs8Preamble(MlKemAlgorithm algorithm)(package private) byte[]getSeed()inthashCode()booleanisDestroyed()private voidreadObject(java.io.ObjectInputStream in)private voidwriteObject(java.io.ObjectOutputStream out)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
PRIVATE_KEY_SIZE_BYTES
static final int PRIVATE_KEY_SIZE_BYTES
- See Also:
- Constant Field Values
-
seed
private byte[] seed
-
algorithm
private final MlKemAlgorithm algorithm
-
-
Constructor Detail
-
OpenSslMlKemPrivateKey
public OpenSslMlKemPrivateKey(byte[] seed, MlKemAlgorithm algorithm)
-
-
Method Detail
-
getAlgorithm
public java.lang.String getAlgorithm()
- Specified by:
getAlgorithmin interfacejava.security.Key
-
getMlKemAlgorithm
MlKemAlgorithm getMlKemAlgorithm()
-
getFormat
public java.lang.String getFormat()
- Specified by:
getFormatin interfacejava.security.Key
-
getPkcs8Preamble
private static byte[] getPkcs8Preamble(MlKemAlgorithm algorithm)
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncodedin interfacejava.security.Key
-
getSeed
byte[] getSeed()
-
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)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
readObject
private void readObject(java.io.ObjectInputStream in)
-
writeObject
private void writeObject(java.io.ObjectOutputStream out)
-
-