Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

RC2CryptoServiceProvider::CreateEncryptor Method (array<Byte>^, array<Byte>^)

 

Creates a symmetric RC2 encryptor object with the specified key (Key) and initialization vector (IV).

Namespace:   System.Security.Cryptography
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual ICryptoTransform^ CreateEncryptor(
	array<unsigned char>^ rgbKey,
	array<unsigned char>^ rgbIV
) override

Parameters

rgbKey
Type: array<System::Byte>^

The secret key to use for the symmetric algorithm.

rgbIV
Type: array<System::Byte>^

The initialization vector to use for the symmetric algorithm.

Return Value

Type: System.Security.Cryptography::ICryptoTransform^

A symmetric RC2 encryptor object.

Exception Condition
CryptographicException

An OFB cipher mode was used.

-or-

A CFB cipher mode with a feedback size other than 8 bits was used.

-or-

An invalid key size was used.

-or-

The algorithm key size was not available.

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

The following code example encrypts and then decrypts a string.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft