This documentation is archived and is not being maintained.

SymmetricAlgorithm.CreateEncryptor Method (Byte[], Byte[])

.NET Framework 1.1

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

[Visual Basic]
Overloads Public MustOverride Function CreateEncryptor( _
   ByVal rgbKey() As Byte, _
   ByVal rgbIV() As Byte _
) As ICryptoTransform
public abstract ICryptoTransform CreateEncryptor(
 byte[] rgbKey,
 byte[] rgbIV
public: virtual ICryptoTransform* CreateEncryptor(
 unsigned char rgbKey __gc[],
 unsigned char rgbIV __gc[]
) = 0;
public abstract function CreateEncryptor(
   rgbKey : Byte[],
 rgbIV : Byte[]
) : ICryptoTransform;


The secret key to be used for the symmetric algorithm.
The initialization vector to be used for the symmetric algorithm.

Return Value

A symmetric encryptor object.


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


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

SymmetricAlgorithm Class | SymmetricAlgorithm Members | System.Security.Cryptography Namespace | SymmetricAlgorithm.CreateEncryptor Overload List | Cryptographic Services