MLKem.ImportEncryptedPkcs8PrivateKey メソッド

定義

オーバーロード

名前 説明
ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

PKCS#8 EncryptedPrivateKeyInfo 構造体から ML-KEM 秘密キーをインポートします。

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

PKCS#8 EncryptedPrivateKeyInfo 構造体から ML-KEM 秘密キーをインポートします。

ImportEncryptedPkcs8PrivateKey(String, Byte[])

PKCS#8 EncryptedPrivateKeyInfo 構造体から ML-KEM 秘密キーをインポートします。

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

ソース:
MLKem.cs
ソース:
MLKem.cs
ソース:
MLKem.cs

PKCS#8 EncryptedPrivateKeyInfo 構造体から ML-KEM 秘密キーをインポートします。

public:
 static System::Security::Cryptography::MLKem ^ ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<System::Byte> passwordBytes, ReadOnlySpan<System::Byte> source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, ReadOnlySpan<byte> source);
public static System.Security.Cryptography.MLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, ReadOnlySpan<byte> source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
static member ImportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
Public Shared Function ImportEncryptedPkcs8PrivateKey (passwordBytes As ReadOnlySpan(Of Byte), source As ReadOnlySpan(Of Byte)) As MLKem

パラメーター

passwordBytes
ReadOnlySpan<Byte>

キー マテリアルの暗号化を解除するときにパスワードとして使用するバイト数。

source
ReadOnlySpan<Byte>

ASN.1-BER エンコード内の PKCS#8 EncryptedPrivateKeyInfo 構造体のバイト。

返品

インポートされたキー。

属性

例外

sourceの内容は、ASN.1-BER でエンコードされた PKCS#8 EncryptedPrivateKeyInfo 構造体を表していません。

-又は-

指定されたパスワードが正しくありません。

-又は-

EncryptedPrivateKeyInfo は、適用するキー派生関数 (KDF) が従来の PKCS#12 KDF であることを示します。これには、 Char ベースのパスワードが必要です。

-又は-

この値は、ML-KEM キーを表していません。

-又は-

アルゴリズム固有のインポートに失敗しました。

プラットフォームは ML-KEM をサポートしていません。 呼び出し元は、 IsSupported プロパティを使用して、プラットフォームが ML-KEM をサポートしているかどうかを判断できます。

適用対象

ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

ソース:
MLKem.cs
ソース:
MLKem.cs
ソース:
MLKem.cs

PKCS#8 EncryptedPrivateKeyInfo 構造体から ML-KEM 秘密キーをインポートします。

public:
 static System::Security::Cryptography::MLKem ^ ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<System::Byte> source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> source);
public static System.Security.Cryptography.MLKem ImportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, ReadOnlySpan<byte> source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
static member ImportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * ReadOnlySpan<byte> -> System.Security.Cryptography.MLKem
Public Shared Function ImportEncryptedPkcs8PrivateKey (password As ReadOnlySpan(Of Char), source As ReadOnlySpan(Of Byte)) As MLKem

パラメーター

password
ReadOnlySpan<Char>

キー マテリアルの暗号化を解除するときに使用するパスワード。

source
ReadOnlySpan<Byte>

ASN.1-BER エンコード内の PKCS#8 EncryptedPrivateKeyInfo 構造体のバイト。

返品

インポートされたキー。

属性

例外

sourceの内容は、ASN.1-BER でエンコードされた PKCS#8 EncryptedPrivateKeyInfo 構造体を表していません。

-又は-

指定されたパスワードが正しくありません。

-又は-

この値は、ML-KEM キーを表していません。

-又は-

アルゴリズム固有のインポートに失敗しました。

プラットフォームは ML-KEM をサポートしていません。 呼び出し元は、 IsSupported プロパティを使用して、プラットフォームが ML-KEM をサポートしているかどうかを判断できます。

適用対象

ImportEncryptedPkcs8PrivateKey(String, Byte[])

ソース:
MLKem.cs
ソース:
MLKem.cs
ソース:
MLKem.cs

PKCS#8 EncryptedPrivateKeyInfo 構造体から ML-KEM 秘密キーをインポートします。

public:
 static System::Security::Cryptography::MLKem ^ ImportEncryptedPkcs8PrivateKey(System::String ^ password, cli::array <System::Byte> ^ source);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLKem ImportEncryptedPkcs8PrivateKey(string password, byte[] source);
public static System.Security.Cryptography.MLKem ImportEncryptedPkcs8PrivateKey(string password, byte[] source);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
static member ImportEncryptedPkcs8PrivateKey : string * byte[] -> System.Security.Cryptography.MLKem
static member ImportEncryptedPkcs8PrivateKey : string * byte[] -> System.Security.Cryptography.MLKem
Public Shared Function ImportEncryptedPkcs8PrivateKey (password As String, source As Byte()) As MLKem

パラメーター

password
String

キー マテリアルの暗号化を解除するときに使用するパスワード。

source
Byte[]

ASN.1-BER エンコード内の PKCS#8 EncryptedPrivateKeyInfo 構造体のバイト。

返品

インポートされたキー。

属性

例外

password または sourcenull

sourceの内容は、ASN.1-BER でエンコードされた PKCS#8 EncryptedPrivateKeyInfo 構造体を表していません。

-又は-

指定されたパスワードが正しくありません。

-又は-

この値は、ML-KEM キーを表していません。

-又は-

アルゴリズム固有のインポートに失敗しました。

プラットフォームは ML-KEM をサポートしていません。 呼び出し元は、 IsSupported プロパティを使用して、プラットフォームが ML-KEM をサポートしているかどうかを判断できます。

適用対象