File: README

package info (click to toggle)
libcrypt-twofish-perl 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 96 kB
  • ctags: 61
  • sloc: ansic: 298; perl: 263; makefile: 15
file content (65 lines) | stat: -rw-r--r-- 1,973 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
NAME
    Crypt::Twofish - The Twofish Encryption Algorithm

SYNOPSIS
    use Crypt::Twofish;

    $cipher = Crypt::Twofish->new($key);

    $ciphertext = $cipher->encrypt($plaintext);

    $plaintext = $cipher->decrypt($ciphertext);

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

  Functions

    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.

SEE ALSO
    Crypt::CBC, Crypt::Blowfish, Crypt::TEA

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

AUTHOR
    Abhijit Menon-Sen <ams@wiw.org>

    Copyright 2001 Abhijit Menon-Sen. All rights reserved.

    This software is distributed under the terms of the Artistic
    License <URL:http://ams.wiw.org/code/artistic.txt>.