Share via


RSACng.TryDecrypt 方法

定義

使用私密金鑰解密資料。

public:
 override bool TryDecrypt(ReadOnlySpan<System::Byte> data, Span<System::Byte> destination, System::Security::Cryptography::RSAEncryptionPadding ^ padding, [Runtime::InteropServices::Out] int % bytesWritten);
public override bool TryDecrypt (ReadOnlySpan<byte> data, Span<byte> destination, System.Security.Cryptography.RSAEncryptionPadding padding, out int bytesWritten);
override this.TryDecrypt : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.RSAEncryptionPadding * int -> bool
Public Overrides Function TryDecrypt (data As ReadOnlySpan(Of Byte), destination As Span(Of Byte), padding As RSAEncryptionPadding, ByRef bytesWritten As Integer) As Boolean

參數

data
ReadOnlySpan<Byte>

要解密的資料。

destination
Span<Byte>

接收解密資料的緩衝區。

padding
RSAEncryptionPadding

填補模式。

bytesWritten
Int32

當這個方法傳回時,寫入 destination 的位元組總數。 這個參數會被視為未初始化。

傳回

如果 destination 的長度足以接收解密的資料,則為 true;否則為 false

適用於