יובל קוג'מן (Yuval Kogman) > Crypt-Random-Source-0.03 > Crypt::Random::Source::Weak::rand

Download:
Crypt-Random-Source-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: Crypt-Random-Source-0.08

NAME ^

Crypt::Random::Source::Weak::rand - Use rand to create random bytes.

SYNOPSIS ^

        use Crypt::Random::Source::Weak::rand;

        my $p = Crypt::Random::Source::Weak::rand->new;

        $p->get(1024);

DESCRIPTION ^

This is a weak source of random data, that uses Perl's builtin rand function.

METHODS ^

seed @blah

Sets the random seed to a checksum of the stringified values of @blah.

There is no need to call this method unless you want the random sequence to be identical to a previously run, in which case you should seed with the same value.

get $n

Produces $n random bytes.

syntax highlighting: