MLDsa.TryExportEncryptedPkcs8PrivateKey メソッド

定義

オーバーロード

名前 説明
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

バイトベースのパスワードを使用して、PKCS#8 EncryptedPrivateKeyInfo 形式の現在のキーを指定されたバッファーにエクスポートしようとします。

TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

文字ベースのパスワードを使用して、PKCS#8 EncryptedPrivateKeyInfo 形式の現在のキーを指定されたバッファーにエクスポートしようとします。

TryExportEncryptedPkcs8PrivateKey(String, PbeParameters, Span<Byte>, Int32)

文字ベースのパスワードを使用して、PKCS#8 EncryptedPrivateKeyInfo 形式の現在のキーを指定されたバッファーにエクスポートしようとします。

TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)

ソース:
MLDsa.cs
ソース:
MLDsa.cs
ソース:
MLDsa.cs

バイトベースのパスワードを使用して、PKCS#8 EncryptedPrivateKeyInfo 形式の現在のキーを指定されたバッファーにエクスポートしようとします。

public:
 bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<System::Byte> passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
public bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
member this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
Public Function TryExportEncryptedPkcs8PrivateKey (passwordBytes As ReadOnlySpan(Of Byte), pbeParameters As PbeParameters, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

パラメーター

passwordBytes
ReadOnlySpan<Byte>

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

pbeParameters
PbeParameters

キー マテリアルを暗号化するときに使用するパスワード ベースの暗号化 (PBE) パラメーター。

destination
Span<Byte>

PKCS#8 EncryptedPrivateKeyInfo 値を受け取るバッファー。

bytesWritten
Int32

このメソッドから制御が戻るときに、 destination バッファーに書き込まれたバイト数が格納されます。

このパラメーターは、初期化されていないものとして扱われます。

返品

true destinationが結果を保持するのに十分な大きさであった場合は。それ以外の場合はfalse

属性

例外

pbeParametersnullです。

このインスタンスは破棄されました。

pbeParameters は、文字ベースのパスワードを必要とする KDF を指定します。

-又は-

pbeParameters は、有効なパスワードベースの暗号化アルゴリズムを表していません。

-又は-

このインスタンスは公開キーのみを表します。

-又は-

秘密キーはエクスポートできません。

-又は-

キーのエクスポート中にエラーが発生しました。

適用対象

TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)

ソース:
MLDsa.cs
ソース:
MLDsa.cs
ソース:
MLDsa.cs

文字ベースのパスワードを使用して、PKCS#8 EncryptedPrivateKeyInfo 形式の現在のキーを指定されたバッファーにエクスポートしようとします。

public:
 bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
public bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
member this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
Public Function TryExportEncryptedPkcs8PrivateKey (password As ReadOnlySpan(Of Char), pbeParameters As PbeParameters, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

パラメーター

password
ReadOnlySpan<Char>

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

pbeParameters
PbeParameters

キー マテリアルを暗号化するときに使用するパスワード ベースの暗号化 (PBE) パラメーター。

destination
Span<Byte>

PKCS#8 EncryptedPrivateKeyInfo 値を受け取るバッファー。

bytesWritten
Int32

このメソッドから制御が戻るときに、 destination バッファーに書き込まれたバイト数が格納されます。

このパラメーターは、初期化されていないものとして扱われます。

返品

true destinationが結果を保持するのに十分な大きさであった場合は。それ以外の場合はfalse

属性

例外

pbeParametersnullです。

このインスタンスは破棄されました。

pbeParameters は、有効なパスワードベースの暗号化アルゴリズムを表していません。

-又は-

このインスタンスは公開キーのみを表します。

-又は-

秘密キーはエクスポートできません。

-又は-

キーのエクスポート中にエラーが発生しました。

適用対象

TryExportEncryptedPkcs8PrivateKey(String, PbeParameters, Span<Byte>, Int32)

ソース:
MLDsa.cs
ソース:
MLDsa.cs
ソース:
MLDsa.cs

文字ベースのパスワードを使用して、PKCS#8 EncryptedPrivateKeyInfo 形式の現在のキーを指定されたバッファーにエクスポートしようとします。

public:
 bool TryExportEncryptedPkcs8PrivateKey(System::String ^ password, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
[System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportEncryptedPkcs8PrivateKey(string password, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
public bool TryExportEncryptedPkcs8PrivateKey(string password, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
[<System.Diagnostics.CodeAnalysis.Experimental("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.TryExportEncryptedPkcs8PrivateKey : string * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
member this.TryExportEncryptedPkcs8PrivateKey : string * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
Public Function TryExportEncryptedPkcs8PrivateKey (password As String, pbeParameters As PbeParameters, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

パラメーター

password
String

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

pbeParameters
PbeParameters

キー マテリアルを暗号化するときに使用するパスワード ベースの暗号化 (PBE) パラメーター。

destination
Span<Byte>

PKCS#8 EncryptedPrivateKeyInfo 値を受け取るバッファー。

bytesWritten
Int32

このメソッドから制御が戻るときに、 destination バッファーに書き込まれたバイト数が格納されます。

このパラメーターは、初期化されていないものとして扱われます。

返品

true destinationが結果を保持するのに十分な大きさであった場合は。それ以外の場合はfalse

属性

例外

password または pbeParametersnull

適用対象