संपादित करें

इसके माध्यम से साझा किया गया


SymmetricAlgorithm.TryDecryptEcb Method

Definition

Attempts to decrypt data into the specified buffer, using ECB mode with the specified padding mode.

public:
 bool TryDecryptEcb(ReadOnlySpan<System::Byte> ciphertext, Span<System::Byte> destination, System::Security::Cryptography::PaddingMode paddingMode, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryDecryptEcb (ReadOnlySpan<byte> ciphertext, Span<byte> destination, System.Security.Cryptography.PaddingMode paddingMode, out int bytesWritten);
member this.TryDecryptEcb : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.PaddingMode * int -> bool
Public Function TryDecryptEcb (ciphertext As ReadOnlySpan(Of Byte), destination As Span(Of Byte), paddingMode As PaddingMode, ByRef bytesWritten As Integer) As Boolean

Parameters

ciphertext
ReadOnlySpan<Byte>

The data to decrypt.

destination
Span<Byte>

The buffer to receive the plaintext data.

paddingMode
PaddingMode

The padding mode used to produce the ciphertext and remove during decryption.

bytesWritten
Int32

When this method returns, contains the total number of bytes written to destination.

Returns

true if destination was large enough to receive the decrypted data; otherwise, false.

Exceptions

paddingMode is not a valid padding mode.

The ciphertext could not be decrypted successfully.

Remarks

This method's behavior is defined by TryDecryptEcbCore(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode, Int32).

Applies to