1Crypt::Stream::Rabbit(3U)ser Contributed Perl DocumentatiCornypt::Stream::Rabbit(3)
2
3
4

NAME

6       Crypt::Stream::Rabbit - Stream cipher Rabbit
7

SYNOPSIS

9          use Crypt::Stream::Rabbit;
10
11          # encrypt
12          $key = "1234567890123456";
13          $iv  = "12345678";
14          $stream = Crypt::Stream::Rabbit->new($key, $iv);
15          $ct = $stream->crypt("plain message");
16
17          # decrypt
18          $key = "1234567890123456";
19          $iv  = "12345678";
20          $stream = Crypt::Stream::Rabbit->new($key, $iv);
21          $pt = $stream->crypt($ct);
22

DESCRIPTION

24       Provides an interface to the Rabbit stream cipher.
25

METHODS

27   new
28        $stream = Crypt::Stream::Rabbit->new($key, $iv);
29        # $key .. keylen must be up to 16 bytes
30        # $iv  .. ivlen must be up to 8 bytes
31
32        $stream = Crypt::Stream::Rabbit->new($key);
33        #BEWARE: this is different from new($key, "")
34
35   crypt
36        $ciphertext = $stream->crypt($plaintext);
37        #or
38        $plaintext = $stream->crypt($ciphertext);
39
40   keystream
41        $random_key = $stream->keystream($length);
42
43   clone
44        $stream->clone();
45

SEE ALSO

47       •   Crypt::Stream::RC4, Crypt::Stream::ChaCha, Crypt::Stream::Salsa20,
48           Crypt::Stream::Sober128
49
50       •   <https://en.wikipedia.org/wiki/Rabbit_(cipher)>
51
52
53
54perl v5.38.0                      2023-10-04          Crypt::Stream::Rabbit(3)
Impressum