Table of Contents

Method ImportEncryptedPkcs8PrivateKey

Namespace
Rotherprivat.KemBasedNet.Cryptography
Assembly
KemBasedNet.dll

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte>, byte[])

Import private key and create the encryptor / decryptor

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

Parameters

passwordBytes ReadOnlySpan<byte>

Password

pkcs8 byte[]

PKCS#8 encoded private key

Returns

HybridMLKem

encryptor / decryptor instance

Exceptions

CryptographicException

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char>, byte[])

Import private key and create the encryptor / decryptor

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

Parameters

password ReadOnlySpan<char>

Password

pkcs8 byte[]

PKCS#8 encoded private key

Returns

HybridMLKem

encryptor / decryptor instance

Exceptions

CryptographicException

ImportEncryptedPkcs8PrivateKey(string, byte[])

Import private key and create the encryptor / decryptor

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

Parameters

password string

Password

pkcs8 byte[]

PKCS#8 encoded private key

Returns

HybridMLKem

encryptor / decryptor instance