語言

MLDsa.ImportPkcs8PrivateKey 方法

定義

從 PKCS#8 PrivateKeyInfo 結構匯入 ML-DSA 私鑰。

多載

名稱 Description
ImportPkcs8PrivateKey(Byte[])

從 PKCS#8 PrivateKeyInfo 結構匯入 ML-DSA 私鑰。

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>)

從 PKCS#8 PrivateKeyInfo 結構匯入 ML-DSA 私鑰。

ImportPkcs8PrivateKey(Byte[])

來源:
MLDsa.cs
來源:
MLDsa.cs
來源:
MLDsa.cs

從 PKCS#8 PrivateKeyInfo 結構匯入 ML-DSA 私鑰。

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

參數

source
Byte[]

APCS#8 PrivateKeyInfo 結構在 ASN.1-BER 編碼中的位元組。

傳回

匯入的金鑰。

屬性

例外狀況

source 是 null。

適用於

ImportPkcs8PrivateKey(ReadOnlySpan<Byte>)

來源:
MLDsa.cs
來源:
MLDsa.cs
來源:
MLDsa.cs

從 PKCS#8 PrivateKeyInfo 結構匯入 ML-DSA 私鑰。

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

參數

source
ReadOnlySpan<Byte>

APCS#8 PrivateKeyInfo 結構在 ASN.1-BER 編碼中的位元組。

傳回

匯入的金鑰。

屬性

例外狀況

的內容 source 並非由 ASN.1-BER 編碼的 PKCS#8 PrivateKeyInfo 結構。

-或-

PrivateKeyInfo 的值並不代表 ML-DSA 金鑰。

-或-

source 包含ASN.1結構之後的後續資料。

-或-

演算法專用的匯入失敗了。

該平台不支援 ML-DSA。 呼叫者可利用此 IsSupported 特性判斷平台是否支援 ML-DSA。

適用於