Proposal for "Crypt_Blowfish"

» Metadata » Status
» Description

Crypt_Blowfish

Crypt_Blowfish allows for fast two-way encryption using Bruce Schneier's Blowfish algorithm. The encryption is done purely in PHP, therefore Crypt_Blowfish does not require the Mcrypt PHP extension.

Example Usage


<?php

$bf = new Crypt_Blowfish();
$encrypted = $bf->encrypt('this is some example plain text');
$plainText = $bf->decrypt($encrypted);
?>

Crypt_Blowfish can also preform encryption based on a specified key.


<?php

$bf = new Crypt_Blowfish('some secret key!');
$encrypted = $bf->encrypt('this is some example plain text');
$plainText = $bf->decrypt($encrypted);
?>
» Dependencies » Links
  • PEAR
» Timeline » Changelog
  • First Draft: 2005-02-08
  • Proposal: 2005-02-08
  • Call for Votes: 2005-02-15
  • Matthew Fonda
    [2005-02-08 12:37 UTC]

    • changed all constants to CRYPT_BLOWFISH_*
    • prefixed private and properties methods with
  • Matthew Fonda
    [2005-02-08 16:21 UTC]

    • removed @ wrapper from ord
    • added class Crypt_Blowfish_Default_Key which contains the default key
    • Crypt_Blowfish now initializes using Crypt_Blowfish_Default_Key object
  • Matthew Fonda
    [2005-02-08 19:01 UTC]

    • setKey() method now takes optional $key parameter. If $key is given, it will set the secret key to $key. If no parameters, it will reset to the default key
  • Matthew Fonda
    [2005-02-09 05:38 UTC]

    • updated to better follow coding standards
    • renamed Crypt_Blowfish_Default_Key class to Crypt_Blowfish_DefaultKey
    • includes default key when needed
  • Matthew Fonda
    [2005-02-09 19:30 UTC]

    • Greatly increased speed of encryption
    • Inlined function _F()
    • Replaced ord/chr calls with cleaner and faster pack/unpack (Thanks to Ant Aasma for the speed optimizations)
  • Thies C. Arntzen
    [2023-09-02 18:38 UTC]

  • Thies C. Arntzen
    [2023-09-02 18:39 UTC]

  • Thies C. Arntzen
    [2023-10-31 07:55 UTC]