MLKem.TryExportEncryptedPkcs8PrivateKey Metod

Definition

Överlagringar

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

Försöker exportera den aktuella nyckeln i formatet PKCS#8 EncryptedPrivateKeyInfo till en angiven buffert med ett bytebaserat lösenord.

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

Försöker exportera den aktuella nyckeln i formatet PKCS#8 EncryptedPrivateKeyInfo till en angiven buffert med hjälp av ett teckenbaserat lösenord.

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

Försöker exportera den aktuella nyckeln i formatet PKCS#8 EncryptedPrivateKeyInfo till en angiven buffert med hjälp av ett teckenbaserat lösenord.

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

Källa:
MLKem.cs
Källa:
MLKem.cs
Källa:
MLKem.cs

Försöker exportera den aktuella nyckeln i formatet PKCS#8 EncryptedPrivateKeyInfo till en angiven buffert med ett bytebaserat lösenord.

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

Parametrar

passwordBytes
ReadOnlySpan<Byte>

Lösenordet som ska användas vid kryptering av nyckelmaterialet.

pbeParameters
PbeParameters

Parametrarna för lösenordsbaserad kryptering (PBE) som ska användas vid kryptering av nyckelmaterialet.

destination
Span<Byte>

Bufferten för att ta emot PKCS#8 EncryptedPrivateKeyInfo-värdet.

bytesWritten
Int32

När den här metoden returnerar innehåller antalet byte som skrivits till bufferten destination .

Den här parametern behandlas som oinitierad.

Returer

trueom destination var tillräckligt stor för att hålla resultatet, annars . false

Attribut

Undantag

pbeParameters är null.

Den här instansen har tagits bort.

Den här instansen representerar bara en offentlig nyckel.

-eller-

Den privata nyckeln kan inte exporteras.

-eller-

Ett fel uppstod när nyckeln exporterades.

-eller-

pbeParameters representerar inte en giltig lösenordsbaserad krypteringsalgoritm.

Gäller för

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

Källa:
MLKem.cs
Källa:
MLKem.cs
Källa:
MLKem.cs

Försöker exportera den aktuella nyckeln i formatet PKCS#8 EncryptedPrivateKeyInfo till en angiven buffert med hjälp av ett teckenbaserat lösenord.

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

Parametrar

password
ReadOnlySpan<Char>

Lösenordet som ska användas vid kryptering av nyckelmaterialet.

pbeParameters
PbeParameters

Parametrarna för lösenordsbaserad kryptering (PBE) som ska användas vid kryptering av nyckelmaterialet.

destination
Span<Byte>

Bufferten för att ta emot PKCS#8 EncryptedPrivateKeyInfo-värdet.

bytesWritten
Int32

När den här metoden returnerar innehåller antalet byte som skrivits till bufferten destination .

Den här parametern behandlas som oinitierad.

Returer

trueom destination var tillräckligt stor för att hålla resultatet, annars . false

Attribut

Undantag

pbeParameters är null.

Den här instansen har tagits bort.

Den här instansen representerar bara en offentlig nyckel.

-eller-

Den privata nyckeln kan inte exporteras.

-eller-

Ett fel uppstod när nyckeln exporterades.

-eller-

pbeParameters representerar inte en giltig lösenordsbaserad krypteringsalgoritm.

Gäller för

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

Källa:
MLKem.cs
Källa:
MLKem.cs
Källa:
MLKem.cs

Försöker exportera den aktuella nyckeln i formatet PKCS#8 EncryptedPrivateKeyInfo till en angiven buffert med hjälp av ett teckenbaserat lösenord.

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

Parametrar

password
String

Lösenordet som ska användas vid kryptering av nyckelmaterialet.

pbeParameters
PbeParameters

Parametrarna för lösenordsbaserad kryptering (PBE) som ska användas vid kryptering av nyckelmaterialet.

destination
Span<Byte>

Bufferten för att ta emot PKCS#8 EncryptedPrivateKeyInfo-värdet.

bytesWritten
Int32

När den här metoden returnerar innehåller antalet byte som skrivits till bufferten destination .

Den här parametern behandlas som oinitierad.

Returer

trueom destination var tillräckligt stor för att hålla resultatet, annars . false

Attribut

Undantag

password eller pbeParameters är null.

Den här instansen har tagits bort.

Den här instansen representerar bara en offentlig nyckel.

-eller-

Den privata nyckeln kan inte exporteras.

-eller-

Ett fel uppstod när nyckeln exporterades.

-eller-

pbeParameters representerar inte en giltig lösenordsbaserad krypteringsalgoritm.

Gäller för