public class MLDSAPrivateKey
extends iaik.pkcs.pkcs8.PrivateKeyInfo
References:
Modifier and Type | Class and Description |
---|---|
static class |
MLDSAPrivateKey.PrivateKeyEncoding
This enumeration is only applied for the needed encoding as an ASN.1 object.
|
Constructor and Description |
---|
MLDSAPrivateKey(byte[] encodedPrivateKey)
Create a private key from an ASN.1 encoded byte sequence
|
Modifier and Type | Method and Description |
---|---|
protected void |
decode(byte[] bytes) |
protected byte[] |
encode() |
boolean |
equals(Object other) |
String |
getAlgorithm() |
MLDSAPrivateKey.PrivateKeyEncoding |
getPrivateKeyEncoding() |
MLDSAPublicKey |
getPublicKey() |
byte[] |
getPublicKeyBytes() |
byte[] |
getRawBytes()
Returns the raw bytes of this private key.
|
byte[] |
getRawBytesWithPubKey()
Returns the raw concatenated bytes of the private and public key.
|
int |
hashCode() |
void |
setPrivateKeyEncoding(MLDSAPrivateKey.PrivateKeyEncoding privateKeyEncoding)
Set the
privateKeyEncodingDefault variable |
clone, createPrivateKeyInfo, decode, getAlgorithmID, getAttributes, getEncoded, getFormat, getPrivateKey, getPrivateKey, getPrivateKey, getPrivateKey, getPrivateKey, getPrivateKey, getPubKey, setAttributes, setPubKey, toASN1Object, toString, writeTo
finalize, getClass, notify, notifyAll, wait, wait, wait
destroy, isDestroyed
public MLDSAPrivateKey(byte[] encodedPrivateKey) throws InvalidKeyException
encodedPrivateKey
- private key encoded as ASN.1 byte sequenceInvalidKeyException
public byte[] getRawBytes()
public byte[] getRawBytesWithPubKey()
protected void decode(byte[] bytes) throws InvalidKeyException
decode
in class iaik.pkcs.pkcs8.PrivateKeyInfo
InvalidKeyException
protected byte[] encode()
encode
in class iaik.pkcs.pkcs8.PrivateKeyInfo
public String getAlgorithm()
getAlgorithm
in interface Key
getAlgorithm
in class iaik.pkcs.pkcs8.PrivateKeyInfo
public MLDSAPublicKey getPublicKey()
public void setPrivateKeyEncoding(MLDSAPrivateKey.PrivateKeyEncoding privateKeyEncoding) throws PQException
privateKeyEncodingDefault
variableprivateKeyEncoding
- PQException
public MLDSAPrivateKey.PrivateKeyEncoding getPrivateKeyEncoding()
public boolean equals(Object other)
equals
in class iaik.pkcs.pkcs8.PrivateKeyInfo
public int hashCode()
hashCode
in class iaik.pkcs.pkcs8.PrivateKeyInfo
public byte[] getPublicKeyBytes()
Copyright © 2020–2025 Stiftung SIC. All rights reserved.