Crypt::...::Yarrow(3)
π NAME π
hey bestie, youβre looking at Crypt::...::Yarrow(3) β a User Contributed Perl Documentation page. The main character is Crypt::PRNG::Yarrow: a Cryptographically secure PRNG based on Yarrow algorithm. Thatβs the name, and it ate. π
β¨
β¨ SYNOPSIS β¨
okay so vibe check: hereβs the whole thing in code, functional interface first and then the OO interface, exactly as the page says π«Ά
### Functional interface:
use Crypt::PRNG::Yarrow qw(random_bytes random_bytes_hex random_bytes_b64 random_bytes_b64u random_string random_string_from rand irand);
my $octets = random_bytes(45);
my $hex_string = random_bytes_hex(45);
my $base64_string = random_bytes_b64(45);
my $base64url_string = random_bytes_b64u(45);
my $alphanumeric_string = random_string(30);
my $string = random_string_from('ACGT', 64);
my $floating_point_number_0_to_1 = rand;
my $floating_point_number_0_to_88 = rand(88);
my $unsigned_32bit_int = irand;
### OO interface:
use Crypt::PRNG::Yarrow;
my $prng = Crypt::PRNG::Yarrow->new;
my $seeded_prng = Crypt::PRNG::Yarrow->new("some data used for seeding PRNG");
my $octets = $prng->bytes(45);
my $hex_string = $prng->bytes_hex(45);
my $base64_string = $prng->bytes_b64(45);
my $base64url_string = $prng->bytes_b64u(45);
my $alphanumeric_string = $prng->string(30);
my $string = $prng->string_from('ACGT', 64);
my $floating_point_number_0_to_1 = $prng->double;
my $floating_point_number_0_to_88 = $prng->double(88);
my $unsigned_32bit_int = $prng->int32;
π¦ DESCRIPTION π¦
This module gives you an interface to the Yarrow-based pseudo-random number generator. Itβs a thin wrapper around Crypt::PRNG with the algorithm fixed to Yarrow. Every function and method accepts the same arguments and returns the same values as the corresponding Crypt::PRNG entries. no cap, itβs literally that simple π«Ά
π EXPORT π
Nothing is exported by default. highkey no surprise functions in your namespace, bestie.
You can export selected functions:
use Crypt::PRNG::Yarrow qw(random_bytes random_string);
Or all of them at once:
use Crypt::PRNG::Yarrow ':all';
fr fr, thatβs the whole export situation. π
π FUNCTIONS π
All functions below behave exactly like the corresponding Crypt::PRNG functions, but use a hidden Crypt::PRNG::Yarrow object internally.
random_bytes
See random_bytes in Crypt::PRNG. β¨
random_bytes_hex
See random_bytes_hex in Crypt::PRNG. π
random_bytes_b64
See random_bytes_b64 in Crypt::PRNG. π
random_bytes_b64u
See random_bytes_b64u in Crypt::PRNG. π¦
random_string
See random_string in Crypt::PRNG. πΈ
random_string_from
See random_string_from in Crypt::PRNG. π
rand
See rand in Crypt::PRNG. π«Ά
irand
See irand in Crypt::PRNG. π
π§ METHODS π§
Unless noted otherwise, assume $prng is an existing Crypt::PRNG::Yarrow object created via new.
new
my $prng = Crypt::PRNG::Yarrow->new;
my $seeded_prng = Crypt::PRNG::Yarrow->new($seed);
Creates a PRNG object using the Yarrow algorithm. If $seed is omitted, the object is automatically seeded by the underlying Crypt::PRNG logic. the way that optional seed is just chefβs kiss π
bytes
See bytes in Crypt::PRNG. π«
bytes_hex
See bytes_hex in Crypt::PRNG. π₯
bytes_b64
See bytes_b64 in Crypt::PRNG. π
bytes_b64u
See bytes_b64u in Crypt::PRNG. π
string
See string in Crypt::PRNG. β
string_from
See string_from in Crypt::PRNG. π
double
See double in Crypt::PRNG. π
int32
See int32 in Crypt::PRNG. π
π SEE ALSO π
Crypt::PRNGβ go peep it, bestie π<https://en.wikipedia.org/wiki/Yarrow_algorithm>β the Yarrow lore if youβre curious, iykyk π¦
okay thatβs the whole page, bestie π«Ά this cutie is from perl v5.42.0, dated 2026-05-11, and it lives at Crypt::...::Yarrow(3) β mwah π periodt.
π¦ 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