1Crypt::Stream::Sober128U(s3e)r Contributed Perl DocumentaCtriyopnt::Stream::Sober128(3)
2
3
4
6 Crypt::Stream::Sober128 - Stream cipher Sober128
7
9 use Crypt::Stream::Sober128;
10
11 # encrypt
12 $key = "1234567890123456";
13 $iv = "123456789012";
14 $stream = Crypt::Stream::Sober128->new($key, $iv);
15 $ct = $stream->crypt("plain message");
16
17 # decrypt
18 $key = "1234567890123456";
19 $iv = "123456789012";
20 $stream = Crypt::Stream::Sober128->new($key, $iv);
21 $pt = $stream->crypt($ct);
22
24 Provides an interface to the Sober128 stream cipher.
25
27 new
28 $stream = Crypt::Stream::Sober128->new($key, $iv);
29 # $key .. keylen must be multiple of 4 bytes
30 # $iv .. ivlen must be multiple of 4 bytes
31
32 crypt
33 $ciphertext = $stream->crypt($plaintext);
34 #or
35 $plaintext = $stream->crypt($ciphertext);
36
37 keystream
38 $random_key = $stream->keystream($length);
39
40 clone
41 $stream->clone();
42
44 · Crypt::Stream::RC4, Crypt::Stream::ChaCha
45
46 · <https://en.wikipedia.org/wiki/SOBER-128>
47
48
49
50perl v5.30.1 2020-01-29 Crypt::Stream::Sober128(3)