GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Twofish(3) User Contributed Perl Documentation Twofish(3)

Crypt::Twofish - The Twofish Encryption Algorithm

use Crypt::Twofish;

$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.

blocksize
Returns the size (in bytes) of the block (16, in this case).
keysize
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.
new($key)
This creates a new Crypt::Twofish object with the specified key (which should be 16, 24, or 32 bytes long).
encrypt($data)
Encrypts blocksize() bytes of $data and returns the corresponding ciphertext.
decrypt($data)
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 <ams@toroid.org>

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.

2020-11-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.