Mentalis.org Security Library documentation

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

Creates a symmetric decryptor object with the specified Key.

[Visual Basic]
Overrides Overloads Public Function CreateDecryptor( _
   ByVal rgbKey As Byte(), _
   ByVal rgbIV As Byte() _
) As ICryptoTransform
[C#]
public override ICryptoTransform CreateDecryptor(
   byte[] rgbKey,
   byte[] rgbIV
);

Parameters

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

Return Value

A symmetric decryptor object.

Remarks

This method decrypts an encrypted message created using the CreateEncryptor overload with the same parameters.

Exceptions

Exception TypeCondition
ObjectDisposedExceptionThe object is disposed.
ArgumentNullExceptionrgbKey is a null reference (Nothing in Visual Basic).
CryptographicException

See Also

RC4CryptoServiceProvider Class | Org.Mentalis.Security.Cryptography Namespace | RC4CryptoServiceProvider.CreateDecryptor Overload List