e-CryptIt Engine REALbasic Plugin

TwofishECB Class

Twofish is a block cipher, it was one of the five Advanced Encryption Standard (AES) finalists. The Twofish algorithm has been extensively crypt-analyzed.

When Twofish is in ECB mode then no block chaining is done.

The key size in Twofish can be 128,192 or 256 bits.
The block size in Twofish is 128 bits (16 bytes).

Object
   TwofishECB

class TwofishECB implements

IEncryptionAlgorithm

Constructors

TwofishECBThe constructor for the TwofishECB class.

Methods

DecryptUse this function to decrypt a block of data. Because Twofish works on blocks of 16 bytes then you get the best performance if the block size that you pass to it is dividable by 16. The class has built in cache technology so it will work if the the block size is not dividable by 16, but it will be slower.
EncryptUse this function to encrypt a block of data. Because Twofish works on blocks of 16 bytes then you get the best performance if the block size that you pass to it is dividable by 16. The class has built in cache technology so it will work if the the block size is not dividable by 16, but it will be slower.
FinishDecryptUse this function to finish decrypting after you have decrypted all of the blocks.
FinishEncryptUse this function to finish encrypting after you have encrypted all of the blocks.
PaddingBlockSizeUse this property to get the padding value that is needed for this algorithm. (Twofish will always return 16 here).

Supported Platforms:

  • PPC - MacOS 9
  • Carbon - MacOS 9 and MacOS X (PEF)
  • MacOS X PPC - (Mach-O)
  • MacOS X Universal Binary (Mach-O)
  • Win32 - Windows
  • Linux x86