C# Класс CASCExplorer.Salsa20

Implements the Salsa20 stream encryption cipher, as defined at http://cr.yp.to/snuffle.html.
Наследование: System.Security.Cryptography.SymmetricAlgorithm
Показать файл Открыть проект

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

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

Creates a symmetric decryptor object with the specified SymmetricAlgorithm.Key property and initialization vector (SymmetricAlgorithm.IV).

CreateEncryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform

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

GenerateIV ( ) : void

Generates a random initialization vector (SymmetricAlgorithm.IV) to use for the algorithm.

GenerateKey ( ) : void

Generates a random key (SymmetricAlgorithm.Key) to use for the algorithm.

Salsa20 ( ) : System

Initializes a new instance of the Salsa20 class.

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

Метод Описание
CheckValidIV ( byte iv, string paramName ) : void
GetRandomBytes ( int byteCount ) : byte[]
ValidKeySize ( int size ) : bool

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

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

Creates a symmetric decryptor object with the specified SymmetricAlgorithm.Key property and initialization vector (SymmetricAlgorithm.IV).
public CreateDecryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform
rgbKey byte The secret key to use for the symmetric algorithm.
rgbIV byte The initialization vector to use for the symmetric algorithm.
Результат ICryptoTransform

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

Creates a symmetric encryptor object with the specified SymmetricAlgorithm.Key property and initialization vector (SymmetricAlgorithm.IV).
public CreateEncryptor ( byte rgbKey, byte rgbIV ) : ICryptoTransform
rgbKey byte The secret key to use for the symmetric algorithm.
rgbIV byte The initialization vector to use for the symmetric algorithm.
Результат ICryptoTransform

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

Generates a random initialization vector (SymmetricAlgorithm.IV) to use for the algorithm.
public GenerateIV ( ) : void
Результат void

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

Generates a random key (SymmetricAlgorithm.Key) to use for the algorithm.
public GenerateKey ( ) : void
Результат void

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

Initializes a new instance of the Salsa20 class.
The implementation of the class derived from the symmetric algorithm is not valid.
public Salsa20 ( ) : System
Результат System