SymmetricAlgorithm.DecryptEcb Method (System.Security.Cryptography) (original) (raw)

Definition

Namespace:

System.Security.Cryptography

Assemblies:

netstandard.dll, System.Security.Cryptography.dll

Assemblies:

netstandard.dll, System.Security.Cryptography.Primitives.dll

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

DecryptEcb(ReadOnlySpan, Span, 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

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, Span, PaddingMode, Int32).

Applies to

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

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, Span, PaddingMode, Int32).

Applies to

DecryptEcb(ReadOnlySpan, 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

paddingMode

PaddingMode

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

Returns

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, Span, PaddingMode, Int32).

Applies to