SecurityServices for .NET 2.0 Documentation

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

[This is preliminary documentation and subject to change.]

Creates a symmetric encryptor object with the specified Key.

public override ICryptoTransform CreateEncryptor(
   Byte[] rgbKey,
   Byte[] rgbIV
);

Parameters

Byte[]
The secret key to be used for the symmetric algorithm.
Byte[]
Not used in RC4. It can be a null reference or a byte array with a length less than 2.

Return Value

A symmetric encryptor object.

Remarks

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

Exceptions

Exception Type Condition
ObjectDisposedException The object is disposed.
ArgumentNullException rgbKey is a null reference (Nothing in Visual Basic).
CryptographicException  

See Also

RC4CryptoServiceProvider Class | Org.Mentalis.SecurityServices.Cryptography Namespace | RC4CryptoServiceProvider.CreateEncryptor Overload List