e-CryptIt Engine Xojo Plugin |

# BlowfishCBC Class (console safe)

Blowfish is a symmetric block cipher which takes a variable-length key, from 32 bits to 448 bits. Blowfish has been analysed considerably, and has gained acceptance as a strong encryption algorithm.
When Blowfish is in CBC mode then the blocks are chained together with a IV vector.
The block size in Blowfish is 64 bits (8 bytes).

Object
BlowfishCBC

class BlowfishCBC implements

IEncryptionAlgorithm

#### Constructors

BlowfishCBC (console safe) | One of two constructors that come with the BlowfishCBC class.
BlowfishCBC (console safe) | One of two constructors that come with the BlowfishCBC class.

#### Properties

InitVector (console safe) | Use this property to set the InitVector after construction. (Usually you will want to set this when the class is constructed in the constructor) The InitVector may be initialized with anything, but the recipient needs to know what it was initialized with, or it won't be able to decrypt. Some programs and protocols simplify this, like SSH, where iv is simply initialized to zero. If this parameter is skipped then the iv will be "00000000". The InitVector should always be a 8 character value.

#### Methods

Decrypt (console safe) | Use this function to decrypt a block of data. Because Blowfish works on blocks of 8 bytes then you get the best performance if the block size that you pass to it is dividable by 8. The class has built in cache technology so it will work if the the block size is not dividable by 8, but it will be slower.
Encrypt (console safe) | Use this function to encrypt a block of data. Because Blowfish works on blocks of 8 bytes then you get the best performance if the block size that you pass to it is dividable by 8. The class has built in cache technology so it will work if the the block size is not dividable by 8, but it will be slower.
FinishDecrypt (console safe) | Use this function to finish decrypting after you have decrypted all of the blocks.
FinishEncrypt (console safe) | Use this function to finish encrypting after you have encrypted all of the blocks.
PaddingBlockSize (console safe) | Use this property to get the padding value that is needed for this algorithm. (Blowfish will always return 8 here). The Blowfish encrypts in pairs of 8 bytes, so if you have data that does not add up to 8 then you will need to add PaddingBlockSize-1 bytes of random data to ensure that all of your data is encrypted.
Reset (console safe) | Use this method to reset the class back to the same parameters as when it was constructed. This method can be used when you want to encrypt/decrypt again without needing to construct the class again.

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon
- Windows 32 bit
- Windows 64 bit
- Windows ARM 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM 32 bit
- Linux ARM 64 bit
- iOS