C# Class ManyMonkeys.Cryptography.Twofish

Summary description for Twofish encryption algorithm of which more information can be found at http://www.counterpane.com/twofish.html. This is based on the MS cryptographic framework and can therefore be used in place of the RijndaelManaged classes provided by MS in System.Security.Cryptography and the other related classes
Inheritance: System.Security.Cryptography.SymmetricAlgorithm
Show file Open project: hdneo/mxo-hd Class Usage Examples

Public Methods

Method Description
CreateDecryptor ( byte key, byte iv ) : ICryptoTransform

Creates an object that supports ICryptoTransform that can be used to decrypt data using the Twofish encryption algorithm.

CreateEncryptor ( byte key, byte iv ) : ICryptoTransform

Creates an object that supports ICryptoTransform that can be used to encrypt data using the Twofish encryption algorithm.

GenerateIV ( ) : void

Generates a random initialization Vector (IV).

GenerateKey ( ) : void

Generates a random Key. This is only really useful in testing scenarios.

Twofish ( ) : System

This is the Twofish constructor.

Method Details

CreateDecryptor() public method

Creates an object that supports ICryptoTransform that can be used to decrypt data using the Twofish encryption algorithm.
public CreateDecryptor ( byte key, byte iv ) : ICryptoTransform
key byte A byte array that contains a key. The length of this key should be equal to the KeySize property
iv byte A byte array that contains an initialization vector. The length of this IV should be equal to the BlockSize property
return ICryptoTransform

CreateEncryptor() public method

Creates an object that supports ICryptoTransform that can be used to encrypt data using the Twofish encryption algorithm.
public CreateEncryptor ( byte key, byte iv ) : ICryptoTransform
key byte A byte array that contains a key. The length of this key should be equal to the KeySize property
iv byte A byte array that contains an initialization vector. The length of this IV should be equal to the BlockSize property
return ICryptoTransform

GenerateIV() public method

Generates a random initialization Vector (IV).
public GenerateIV ( ) : void
return void

GenerateKey() public method

Generates a random Key. This is only really useful in testing scenarios.
public GenerateKey ( ) : void
return void

Twofish() public method

This is the Twofish constructor.
public Twofish ( ) : System
return System