Class BCSLHDSAPrivateKey
java.lang.Object
org.bouncycastle.jcajce.provider.asymmetric.slhdsa.BCSLHDSAPrivateKey
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, Key, PrivateKey, Destroyable, BCKey, SLHDSAKey, SLHDSAPrivateKey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroy this key, zeroizing the secret key material it holds.booleanCompare this SPHINCS-256 private key with another object.final Stringbyte[]Return the parameters for this key.Return the parameter set of this key as a java.security.spec.NamedParameterSpec, the form the JDK's own keys report through java.security.AsymmetricKey.getParams() from Java 22.Return the public key corresponding to this private key.inthashCode()booleantoString()
-
Constructor Details
-
BCSLHDSAPrivateKey
-
BCSLHDSAPrivateKey
- Throws:
IOException
-
-
Method Details
-
equals
-
hashCode
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey- Returns:
- name of the algorithm - "SLH-DSA..."
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
getPublicKey
Description copied from interface:SLHDSAPrivateKeyReturn the public key corresponding to this private key.- Specified by:
getPublicKeyin interfaceSLHDSAPrivateKey- Returns:
- a SLH-DSA Public Key
-
getParams
Return the parameter set of this key as a java.security.spec.NamedParameterSpec, the form the JDK's own keys report through java.security.AsymmetricKey.getParams() from Java 22.- Specified by:
getParamsin interfaceAsymmetricKey- Returns:
- a NamedParameterSpec naming the parameter set on Java 11 and later, null otherwise.
-
getParameterSpec
Description copied from interface:SLHDSAKeyReturn the parameters for this key.- Specified by:
getParameterSpecin interfaceSLHDSAKey- Returns:
- a SLHDSAParameterSpec
-
getFormat
-
toString
-
destroy
public void destroy()Destroy this key, zeroizing the secret key material it holds.After destruction
isDestroyed()returns true andgetEncoded()throwsIllegalStateException.- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-