25 Nov 2020 04:54:10 UTC
- Distribution: Crypt-Twofish
- Module version: 2.18
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (172 / 0 / 0)
- KwaliteeBus factor: 1
- 80.87% Coverage
- License: unknown
- Activity24 month
- Download (13.58KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionAMS Abhijit Menon-Sen
Crypt::Twofish - The Twofish Encryption Algorithm
$cipher = Crypt::Twofish->new($key);
$ciphertext = $cipher->encrypt($plaintext);
$plaintext = $cipher->decrypt($ciphertext);
Twofish is a 128-bit symmetric block cipher with a variable length (128, 192, or 256-bit) key, developed by Counterpane Labs. It is unpatented and free for all uses, as described at <URL:http://www.counterpane.com/twofish.html>.
This module implements Twofish encryption. It supports the Crypt::CBC interface, with the functions described below. It also provides an interface that is call-compatible with Crypt::Twofish 1.0, but its use in new code is strongly discouraged.
Returns the size (in bytes) of the block (16, in this case).
Returns the size (in bytes) of the key. Although the module understands 128, 192, and 256-bit keys, it returns 16 for compatibility with Crypt::CBC.
This creates a new Crypt::Twofish object with the specified key (which should be 16, 24, or 32 bytes long).
Encrypts blocksize() bytes of $data and returns the corresponding ciphertext.
Decrypts blocksize() bytes of $data and returns the corresponding plaintext.
Crypt::CBC, Crypt::Blowfish, Crypt::TEA
- Nishant Kakani
For writing Crypt::Twofish 1.0 (this version is a complete rewrite).
- Tony Cook
For making the module work under Activeperl, testing on several platforms, and suggesting that I probe for features via %Config.
Abhijit Menon-Sen <email@example.com>
Copyright 2001 Abhijit Menon-Sen.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Crypt::Twofish, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Crypt::Twofish
For more information on module installation, please visit the detailed CPAN module installation guide.