public class BCMLKEMPrivateKey extends java.lang.Object implements MLKEMPrivateKey
| Constructor and Description |
|---|
BCMLKEMPrivateKey(MLKEMPrivateKeyParameters params) |
BCMLKEMPrivateKey(PrivateKeyInfo keyInfo) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o)
Compare this ML-KEM private key with another object.
|
java.lang.String |
getAlgorithm() |
byte[] |
getEncoded() |
java.lang.String |
getFormat() |
MLKEMParameterSpec |
getParameterSpec()
Return the parameters for this key.
|
byte[] |
getPrivateData()
Return the long form private data for the ML-KEM private key.
|
MLKEMPrivateKey |
getPrivateKey(boolean preferSeedOnly)
Return a privateKey which will encode as seed-only or as an expanded-key.
|
MLKEMPublicKey |
getPublicKey()
Return the public key corresponding to this private key.
|
byte[] |
getSeed()
Return the seed the private key was generated from (if available).
|
int |
hashCode() |
java.lang.String |
toString() |
public BCMLKEMPrivateKey(MLKEMPrivateKeyParameters params)
public BCMLKEMPrivateKey(PrivateKeyInfo keyInfo) throws java.io.IOException
java.io.IOExceptionpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the other objectpublic int hashCode()
hashCode in class java.lang.Objectpublic final java.lang.String getAlgorithm()
getAlgorithm in interface java.security.Keypublic byte[] getEncoded()
getEncoded in interface java.security.Keypublic MLKEMPublicKey getPublicKey()
MLKEMPrivateKeygetPublicKey in interface MLKEMPrivateKeypublic byte[] getPrivateData()
MLKEMPrivateKeygetPrivateData in interface MLKEMPrivateKeypublic byte[] getSeed()
MLKEMPrivateKeygetSeed in interface MLKEMPrivateKeypublic MLKEMPrivateKey getPrivateKey(boolean preferSeedOnly)
MLKEMPrivateKeygetPrivateKey in interface MLKEMPrivateKeypreferSeedOnly - if true, return a privateKey which will encode to seed-only if possible.public MLKEMParameterSpec getParameterSpec()
MLKEMKeygetParameterSpec in interface MLKEMKeypublic java.lang.String getFormat()
getFormat in interface java.security.Keypublic java.lang.String toString()
toString in class java.lang.Object