phpseclib/phpseclib — pull request #100 by petrich (2013-05-05 02:51:03+00:00)
Title: Blowfish.php

Now Blowfish... it's ready...

The code architectur from Crypt_Blowfish() object behavior is equal to the other phpseclib block ciphers.

On benchmark tests on my Linux-Kisterl, Crypt_Blowfish() in MODE_INTERNAL is currently (with a full 448bit key) the fastest block cipher from all in phpseclib.
Even faster than AES-128, and ~50% faster than AES-256.

Strong tested against other Blowfish reference -implementation, works on all php version from 4 to 5.x on any plattform Win/Mac/*nix 32/64bit.

Terra... could you especially check setPassword() ... is the default salt and the $key-length (448bit) ok so?

Usage:
```php
include('Crypt/Blowfish.php');
define('CRYPT_BLOWFISH_MODE', CRYPT_BLOWFISH_MODE_INTERNAL);
// define('CRYPT_Blowfish_MODE', CRYPT_BLOWFISH_MODE_MCRYPT);

$Blowfish = new Crypt_Blowfish(CRYPT_BLOWFISH_MODE_ECB);
$Blowfish->setKey('12345678901234567890123456789012');
echo $Blowfish->decrypt($Blowfish->encrypt('1234567890-1234567890'));
```

From my side... it's ready to merge.
Greetings :-)