1Twofish(3)            User Contributed Perl Documentation           Twofish(3)
2
3
4

NAME

6       Crypt::Twofish - The Twofish Encryption Algorithm
7

SYNOPSIS

9       use Crypt::Twofish;
10
11       $cipher = Crypt::Twofish->new($key);
12
13       $ciphertext = $cipher->encrypt($plaintext);
14
15       $plaintext  = $cipher->decrypt($ciphertext);
16

DESCRIPTION

18       Twofish is a 128-bit symmetric block cipher with a variable length
19       (128, 192, or 256-bit) key, developed by Counterpane Labs. It is
20       unpatented and free for all uses, as described at
21       <URL:http://www.counterpane.com/twofish.html>.
22
23       This module implements Twofish encryption. It supports the Crypt::CBC
24       interface, with the functions described below. It also provides an
25       interface that is call-compatible with Crypt::Twofish 1.0, but its use
26       in new code is strongly discouraged.
27
28   Functions
29       blocksize
30           Returns the size (in bytes) of the block (16, in this case).
31
32       keysize
33           Returns the size (in bytes) of the key. Although the module
34           understands 128, 192, and 256-bit keys, it returns 16 for
35           compatibility with Crypt::CBC.
36
37       new($key)
38           This creates a new Crypt::Twofish object with the specified key
39           (which should be 16, 24, or 32 bytes long).
40
41       encrypt($data)
42           Encrypts blocksize() bytes of $data and returns the corresponding
43           ciphertext.
44
45       decrypt($data)
46           Decrypts blocksize() bytes of $data and returns the corresponding
47           plaintext.
48

SEE ALSO

50       Crypt::CBC, Crypt::Blowfish, Crypt::TEA
51

ACKNOWLEDGEMENTS

53       Nishant Kakani
54           For writing Crypt::Twofish 1.0 (this version is a complete
55           rewrite).
56
57       Tony Cook
58           For making the module work under Activeperl, testing on several
59           platforms, and suggesting that I probe for features via %Config.
60

AUTHOR

62       Abhijit Menon-Sen <ams@toroid.org>
63
64       Copyright 2001 Abhijit Menon-Sen.
65
66       This module is free software; you can redistribute it and/or modify it
67       under the same terms as Perl itself.
68
69
70
71perl v5.30.1                      2020-01-29                        Twofish(3)
Impressum