System.Security.Cryptography.SymmetricAlgorithm.CreateEncryptor Method

When overridden in a derived class, creates a symmetric encryptor object with the specified SymmetricAlgorithm.Key property and initialization vector (SymmetricAlgorithm.IV).

Syntax

public abstract ICryptoTransform CreateEncryptor (byte[] rgbKey, byte[] rgbIV)

Parameters

rgbKey
The secret key to use for the symmetric algorithm.
rgbIV
The initialization vector to use for the symmetric algorithm.

Returns

A symmetric encryptor object.

Remarks

Use the SymmetricAlgorithm.CreateDecryptor overload with the same parameters to decrypt the result of this method.

Requirements

Namespace: System.Security.Cryptography
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0