Class BCHawkPrivateKey
java.lang.Object
org.bouncycastle.pqc.jcajce.provider.hawk.BCHawkPrivateKey
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, Key, PrivateKey, Destroyable, HawkKey
JCA private key wrapper for Hawk. Round-trips through PKCS#8
PrivateKeyInfo via the lightweight PrivateKeyFactory.
Equality uses Arrays.constantTimeAreEqual(byte[], byte[]) on the encoded private
key bytes to avoid leaking secret material through timing-distinguishable
comparisons.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AsymmetricKey
getParamsMethods inherited from interface Destroyable
destroy, isDestroyed
-
Constructor Details
-
BCHawkPrivateKey
-
BCHawkPrivateKey
- Throws:
IOException
-
-
Method Details
-
equals
-
hashCode
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey- Returns:
- name of the algorithm - upper-case form of the Hawk parameter-set name
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
getParameterSpec
Description copied from interface:HawkKeyReturn the parameters for this key.- Specified by:
getParameterSpecin interfaceHawkKey- Returns:
- a HawkParameterSpec
-
getFormat
-