Debian Codegraph @

README

raw
1 NAME
2 Crypt::Twofish - The Twofish Encryption Algorithm
3
4 SYNOPSIS
5 use Crypt::Twofish;
6
7 $cipher = Crypt::Twofish->new($key);
8
9 $ciphertext = $cipher->encrypt($plaintext);
10
11 $plaintext = $cipher->decrypt($ciphertext);
12
13 DESCRIPTION
14 Twofish is a 128-bit symmetric block cipher with a variable
15 length (128, 192, or 256-bit) key, developed by Counterpane
16 Labs. It is unpatented and free for all uses, as described at
17 <URL:http://www.counterpane.com/twofish.html>.
18
19 This module implements Twofish encryption. It supports the
20 Crypt::CBC interface, with the functions described below. It also
21 provides an interface that is call- compatible with Crypt::Twofish
22 1.0, but its use in new code is strongly discouraged.
23
24 Functions
25
26 blocksize
27 Returns the size (in bytes) of the block (16, in this case).
28
29 keysize
30 Returns the size (in bytes) of the key. Although the module
31 understands 128, 192, and 256-bit keys, it returns 16 for
32 compatibility with Crypt::CBC.
33
34 new($key)
35 This creates a new Crypt::Twofish object with the specified
36 key (which should be 16, 24, or 32 bytes long).
37
38 encrypt($data)
39 Encrypts blocksize() bytes of $data and returns the
40 corresponding ciphertext.
41
42 decrypt($data)
43 Decrypts blocksize() bytes of $data and returns the
44 corresponding plaintext.
45
46 SEE ALSO
47 Crypt::CBC, Crypt::Blowfish, Crypt::TEA
48
49 ACKNOWLEDGEMENTS
50 Nishant Kakani
51 For writing Crypt::Twofish 1.0 (this version is a complete
52 rewrite).
53
54 Tony Cook
55 For making the module work under Activeperl, testing on
56 several platforms, and suggesting that I probe for features
57 via %Config.
58
59 AUTHOR
60 Abhijit Menon-Sen <[email protected]>
61
62 Copyright 2001 Abhijit Menon-Sen.
63
64 This module is free software; you can redistribute it and/or modify
65 it under the same terms as Perl itself.