.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Crypt::PRNG::Sober128 3"
.TH Crypt::PRNG::Sober128 3 2023-09-25 "perl v5.38.0" "User Contributed Perl Documentation"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
Crypt::PRNG::Sober128 \- Cryptographically secure PRNG based on Sober128 (stream cipher) algorithm
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 2
\&   ### Functional interface:
\&   use Crypt::PRNG::Sober128 qw(random_bytes random_bytes_hex random_bytes_b64 random_string random_string_from rand irand);
\&
\&   $octets = random_bytes(45);
\&   $hex_string = random_bytes_hex(45);
\&   $base64_string = random_bytes_b64(45);
\&   $base64url_string = random_bytes_b64u(45);
\&   $alphanumeric_string = random_string(30);
\&   $string = random_string_from(\*(AqACGT\*(Aq, 64);
\&   $floating_point_number_0_to_1 = rand;
\&   $floating_point_number_0_to_88 = rand(88);
\&   $unsigned_32bit_int = irand;
\&
\&   ### OO interface:
\&   use Crypt::PRNG::Sober128;
\&
\&   $prng = Crypt::PRNG::Sober128\->new;
\&   #or
\&   $prng = Crypt::PRNG::Sober128\->new("some data used for seeding PRNG");
\&
\&   $octets = $prng\->bytes(45);
\&   $hex_string = $prng\->bytes_hex(45);
\&   $base64_string = $prng\->bytes_b64(45);
\&   $base64url_string = $prng\->bytes_b64u(45);
\&   $alphanumeric_string = $prng\->string(30);
\&   $string = $prng\->string_from(\*(AqACGT\*(Aq, 64);
\&   $floating_point_number_0_to_1 = rand;
\&   $floating_point_number_0_to_88 = rand(88);
\&   $unsigned_32bit_int = irand;
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
Provides an interface to the Sober128 based pseudo random number generator
.PP
All methods and functions are the same as for Crypt::PRNG.
.SH FUNCTIONS
.IX Header "FUNCTIONS"
.SS random_bytes
.IX Subsection "random_bytes"
See "random_bytes" in Crypt::PRNG.
.SS random_bytes_hex
.IX Subsection "random_bytes_hex"
See "random_bytes_hex" in Crypt::PRNG.
.SS random_bytes_b64
.IX Subsection "random_bytes_b64"
See "random_bytes_b64" in Crypt::PRNG.
.SS random_bytes_b64u
.IX Subsection "random_bytes_b64u"
See "random_bytes_b64u" in Crypt::PRNG.
.SS random_string
.IX Subsection "random_string"
See "random_string" in Crypt::PRNG.
.SS random_string_from
.IX Subsection "random_string_from"
See "random_string_from" in Crypt::PRNG.
.SS rand
.IX Subsection "rand"
See "rand" in Crypt::PRNG.
.SS irand
.IX Subsection "irand"
See "irand" in Crypt::PRNG.
.SH METHODS
.IX Header "METHODS"
.SS new
.IX Subsection "new"
See "new" in Crypt::PRNG.
.SS bytes
.IX Subsection "bytes"
See "bytes" in Crypt::PRNG.
.SS bytes_hex
.IX Subsection "bytes_hex"
See "bytes_hex" in Crypt::PRNG.
.SS bytes_b64
.IX Subsection "bytes_b64"
See "bytes_b64" in Crypt::PRNG.
.SS bytes_b64u
.IX Subsection "bytes_b64u"
See "bytes_b64u" in Crypt::PRNG.
.SS string
.IX Subsection "string"
See "string" in Crypt::PRNG.
.SS string_from
.IX Subsection "string_from"
See "string_from" in Crypt::PRNG.
.SS double
.IX Subsection "double"
See "double" in Crypt::PRNG.
.SS int32
.IX Subsection "int32"
See "int32" in Crypt::PRNG.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
.IP \(bu 4
Crypt::PRNG
.IP \(bu 4
<https://en.wikipedia.org/wiki/SOBER\-128>
