ECDiffieHellmanCng.TryExportEncryptedPkcs8PrivateKey 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32) |
尝试使用基于字节的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。 |
| TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32) |
尝试使用基于字符的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。 |
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Byte>, PbeParameters, Span<Byte>, Int32)
尝试使用基于字节的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。
public:
override bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<System::Byte> passwordBytes, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public override bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<byte> passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
override this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<byte> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
Public Overrides 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) 参数。
- bytesWritten
- Int32
此方法返回时,包含一个值,该值指示写入到 destination的字节数。 此参数被视为未初始化。
返回
true 如果 destination 足够大才能接收输出,则为 ;否则为 false。
适用于
TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<Char>, PbeParameters, Span<Byte>, Int32)
尝试使用基于字符的密码将 PKCS#8 EncryptedPrivateKeyInfo 格式中的当前密钥导出到提供的缓冲区中。
public:
override bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, System::Security::Cryptography::PbeParameters ^ pbeParameters, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public override bool TryExportEncryptedPkcs8PrivateKey(ReadOnlySpan<char> password, System.Security.Cryptography.PbeParameters pbeParameters, Span<byte> destination, out int bytesWritten);
override this.TryExportEncryptedPkcs8PrivateKey : ReadOnlySpan<char> * System.Security.Cryptography.PbeParameters * Span<byte> * int -> bool
Public Overrides 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) 参数。
- bytesWritten
- Int32
此方法返回时,包含一个值,该值指示写入到 destination的字节数。 此参数被视为未初始化。
返回
true 如果 destination 足够大才能接收输出,则为 ;否则为 false。