Table of Contents

Method ImportEncryptedPkcs8PrivateKey

Namespace
Rotherprivat.KemBasedNet.Cryptography
Assembly
KemBasedNet.dll

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte>, byte[])

Import private keys of ML-KEM and traditional key exchange algorithms

public static CompositeMLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, byte[] pkcs8)

Parameters

passwordBytes ReadOnlySpan<byte>

password

pkcs8 byte[]

PKCS#8 encoded private key

Returns

CompositeMLKem

keys and algorithm implementation

Exceptions

CryptographicException

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char>, byte[])

Import private keys of ML-KEM and traditional key exchange algorithms

public static CompositeMLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, byte[] pkcs8)

Parameters

password ReadOnlySpan<char>

password

pkcs8 byte[]

PKCS#8 encoded private key

Returns

CompositeMLKem

keys and algorithm implementation

Exceptions

CryptographicException

ImportEncryptedPkcs8PrivateKey(string, byte[])

Import private keys of ML-KEM and traditional key exchange algorithms

public static CompositeMLKem ImportEncryptedPkcs8PrivateKey(string password, byte[] pkcs8)

Parameters

password string

password

pkcs8 byte[]

PKCS#8 encoded private key

Returns

CompositeMLKem

keys and algorithm implementation

Exceptions

CryptographicException