Crypt::...Sober128(3)
π NAME π
Crypt::Stream::Sober128 - Stream cipher Sober128
Okay bestie, welcome to the manual page for Crypt::...Sober128(3) β yep, from the User Contributed Perl Documentation β and the whole thing is about Crypt::Stream::Sober128, aka the Stream cipher Sober128. Slay. β¨
β¨ SYNOPSIS β¨
Here's the whole encrypt/decrypt vibe in one little block, no cap:
use Crypt::Stream::Sober128;
# encrypt
my $key = "1234567890123456";
my $iv = "123456789012";
my $enc_stream = Crypt::Stream::Sober128->new($key, $iv);
my $ct = $enc_stream->crypt("plain message");
# decrypt
my $dec_stream = Crypt::Stream::Sober128->new($key, $iv);
my $pt = $dec_stream->crypt($ct);
π¦ DESCRIPTION π¦
This module gives you an interface to the Sober128 stream cipher. That's the description, and honestly? Iconic brevity. π
π§ METHODS π§
Unless noted otherwise, assume $stream is an existing stream object created via new β like this, bestie:
my $stream = Crypt::Stream::Sober128->new($key, $iv);
π new π
Makes a shiny new stream object. Signature time:
my $stream = Crypt::Stream::Sober128->new($key, $iv);
# $key .. [binary string] keylen must be multiple of 4 bytes
# $iv .. [binary string] ivlen must be multiple of 4 bytes
So: $key is a binary string and keylen must be a multiple of 4 bytes. $iv is a binary string and ivlen must be a multiple of 4 bytes. That's the vibe check. π«Ά
π crypt π
crypt encrypts or decrypts data. The output has the same length as the input, and it returns a binary string (raw bytes). Periodt.
The input is converted using Perl's usual scalar stringification. Passing undef is treated as an empty string with the usual warning, and numeric scalars are stringified before processing. Perl's coercion is literally doing its thing. π
my $ciphertext = $stream->crypt($plaintext);
#or
my $plaintext = $stream->crypt($ciphertext);
π¦ keystream π¦
Returns $length bytes of raw keystream as a binary string. Chef's kiss.
The length is taken using Perl's usual numeric coercion. Values that coerce to an oversized unsigned length are rejected as too large. No sneaky giant keystream, just a firm no. π
my $random_key = $stream->keystream($length);
β clone β
Returns a copy of the stream cipher object in its current state. Clone the vibe, bestie. π«Ά
my $stream2 = $stream->clone();
π SEE ALSO π
Go check out these other icons:
Crypt::Stream::RC4,Crypt::Stream::ChaCha,Crypt::Stream::Salsa20,Crypt::Stream::Sosemanuk<https://en.wikipedia.org/wiki/SOBER-128>
And that's the whole page, bestie π β this gem is from perl v5.42.0, dated 2026-05-11, and it's the Crypt::...Sober128(3) manual page. Byeeee π
π¦ where this page comes from
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-CryptX 0.89.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms