C# Класс Org.Mentalis.Security.Cryptography.RC4CryptoServiceProvider

Defines a wrapper object to access the cryptographic service provider (CSP) version of the RC4 algorithm. This class cannot be inherited.
Наследование: Org.Mentalis.Security.Cryptography.RC4
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateDecryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform

Creates a symmetric decryptor object with the specified Key.

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

CreateEncryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform

Creates a symmetric encryptor object with the specified Key.

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

GenerateIV ( ) : void

This is a stub method.

Since the RC4 cipher doesn't use an Initialization Vector, this method will not do anything.

GenerateKey ( ) : void

Generates a random Key to be used for the algorithm.

Use this method to generate a random key when none is specified.

RC4CryptoServiceProvider ( ) : System

Initializes a new instance of the RC4CryptoServiceProvider class.

Приватные методы

Метод Описание
CanUseUnmanaged ( int keySize ) : bool

Returns a boolean that indicates whether the unmanaged CSP can be used or not.

_Dispose ( ) : void

Releases all managed and unmanaged resources used by this class.

Описание методов

CreateDecryptor() публичный Метод

Creates a symmetric decryptor object with the specified Key.
This method decrypts an encrypted message created using the CreateEncryptor overload with the same parameters.
The object is disposed. is a null reference (Nothing in Visual Basic).
public CreateDecryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform
rgbKey byte The secret key to be used for the symmetric algorithm.
rgbIV byte Not used in RC4. It can be a null reference or a byte array with a length less than 2.
Результат ICryptoTransform

CreateEncryptor() публичный Метод

Creates a symmetric encryptor object with the specified Key.
Use the CreateDecryptor overload with the same parameters to decrypt the result of this method.
The object is disposed. is a null reference (Nothing in Visual Basic).
public CreateEncryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform
rgbKey byte The secret key to be used for the symmetric algorithm.
rgbIV byte Not used in RC4. It can be a null reference or a byte array with a length less than 2.
Результат ICryptoTransform

GenerateIV() публичный Метод

This is a stub method.
Since the RC4 cipher doesn't use an Initialization Vector, this method will not do anything.
public GenerateIV ( ) : void
Результат void

GenerateKey() публичный Метод

Generates a random Key to be used for the algorithm.
Use this method to generate a random key when none is specified.
public GenerateKey ( ) : void
Результат void

RC4CryptoServiceProvider() публичный Метод

Initializes a new instance of the RC4CryptoServiceProvider class.
public RC4CryptoServiceProvider ( ) : System
Результат System