Редагувати

Поділитися через


SymmetricAlgorithm.DecryptEcb Method

Definition

Overloads

DecryptEcb(Byte[], PaddingMode)

Decrypts data using ECB mode with the specified padding mode.

DecryptEcb(ReadOnlySpan<Byte>, PaddingMode)

Decrypts data using ECB mode with the specified padding mode.

DecryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)

Decrypts data into the specified buffer, using ECB mode with the specified padding mode.

DecryptEcb(Byte[], PaddingMode)

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Decrypts data using ECB mode with the specified padding mode.

public:
 cli::array <System::Byte> ^ DecryptEcb(cli::array <System::Byte> ^ ciphertext, System::Security::Cryptography::PaddingMode paddingMode);
public byte[] DecryptEcb (byte[] ciphertext, System.Security.Cryptography.PaddingMode paddingMode);
member this.DecryptEcb : byte[] * System.Security.Cryptography.PaddingMode -> byte[]
Public Function DecryptEcb (ciphertext As Byte(), paddingMode As PaddingMode) As Byte()

Parameters

ciphertext
Byte[]

The data to decrypt.

paddingMode
PaddingMode

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

Returns

Byte[]

The decrypted plaintext data.

Exceptions

ciphertext is null.

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

DecryptEcb(ReadOnlySpan<Byte>, PaddingMode)

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Decrypts data using ECB mode with the specified padding mode.

public:
 cli::array <System::Byte> ^ DecryptEcb(ReadOnlySpan<System::Byte> ciphertext, System::Security::Cryptography::PaddingMode paddingMode);
public byte[] DecryptEcb (ReadOnlySpan<byte> ciphertext, System.Security.Cryptography.PaddingMode paddingMode);
member this.DecryptEcb : ReadOnlySpan<byte> * System.Security.Cryptography.PaddingMode -> byte[]
Public Function DecryptEcb (ciphertext As ReadOnlySpan(Of Byte), paddingMode As PaddingMode) As Byte()

Parameters

ciphertext
ReadOnlySpan<Byte>

The data to decrypt.

paddingMode
PaddingMode

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

Returns

Byte[]

The decrypted plaintext data.

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

DecryptEcb(ReadOnlySpan<Byte>, Span<Byte>, PaddingMode)

Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs
Source:
SymmetricAlgorithm.cs

Decrypts data into the specified buffer, using ECB mode with the specified padding mode.

public:
 int DecryptEcb(ReadOnlySpan<System::Byte> ciphertext, Span<System::Byte> destination, System::Security::Cryptography::PaddingMode paddingMode);
public int DecryptEcb (ReadOnlySpan<byte> ciphertext, Span<byte> destination, System.Security.Cryptography.PaddingMode paddingMode);
member this.DecryptEcb : ReadOnlySpan<byte> * Span<byte> * System.Security.Cryptography.PaddingMode -> int
Public Function DecryptEcb (ciphertext As ReadOnlySpan(Of Byte), destination As Span(Of Byte), paddingMode As PaddingMode) As Integer

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.

Returns

The total number of bytes written to destination

Exceptions

paddingMode is not a valid padding mode.

The ciphertext could not be decrypted successfully.

The buffer in destination is too small to hold the plaintext data.

Remarks

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

Applies to