Crypt::OpenBSD::Blowfish - Perl extension for the OpenBSD Blowfish cipher implementation.
use Crypt::OpenBSD::Blowfish; my $bf = Crypt::OpenBSD::Blowfish->new($key); my $encrypted = $bf->encrypt$data); ... my $decrypted = $bf->decrypt($encrypted);
or to create key material:
use Crypt::OpenBSD::Blowfish; my $bf = Crypt::OpenBSD::Blowfish->new(); $bf->expandstate($salt,$pass); foreach (1..64) { $bf->expand0state($salt); $bf->expand0state($pass); } $key_material = $bf->encrypt_iterate($data,64);
This module is a wrapper for the OpenBSD implementation of the Blowfish cipher. The C source is taken from the portable OpenSSH source code.
Returns 8, as the Blowfish block size is eight octets.
Returns 0, as the Blowfish key size is variable.
Returns a Crypt::OpenBSD::Blowfish object. Passing a key will transform the S-boxes and subkeys with the key.
Returns 8. Blowfish uses an eight-octet block size. May be called via either a class method or object method.
Encrypt $data, which must be in 8-byte chunks.
Decrypt $data, which must be in 8-byte chunks.
Expand the subkeys using data (salt) and a key.
Expand the subkeys using key.
Iteratively encrypt $data for $rounds rounds. Useful for creating key material for a password function.
None by default.
Git Hub home: https://github.com/lkinley/Crypt-OpenBSD-Blowfish/
Lance Kinley, <lkinley@loyaltymethods.com>
Copyright (C) 2015 by Lance Kinley/Loyalty Methods, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.2 or, at your option, any later version of Perl 5 you may have available.
To install Crypt::OpenBSD::Blowfish, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::OpenBSD::Blowfish
CPAN shell
perl -MCPAN -e shell install Crypt::OpenBSD::Blowfish
For more information on module installation, please visit the detailed CPAN module installation guide.