Crypt::Random::Source::Base - Abstract base class for Crypt::Random::Source classes
version 0.14
use Moo; extends qw(Crypt::Random::Source::Base);
This is an abstract base class.
In the future it will be a role.
Gets $n random bytes and returns them as a string.
$n
This method may produce fatal errors if the source was unable to provide enough data.
This method is cannibalized from IO::Scalar. It provides an IO::Handle work-alike.
Note that subclasses override this to operate on a real handle directly if available.
On supporting sources this method will add @stuff, whatever it may be, to the random seed.
@stuff
Some sources may not support this, so be careful.
This is a class method, such that when it returns true calling new without arguments on the class should provide a working source of random data.
new
This is use by Crypt::Random::Source::Factory.
This is a class method, with some futz value for a ranking, to help known good sources be tried before known bad (slower, less available) sources.
Provided for compatibility with Crypt::Random
Bugs may be submitted through the RT bug tracker (or bug-Crypt-Random-Source@rt.cpan.org).
יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>
This software is copyright (c) 2008 by Yuval Kogman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Crypt::Random::Source, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Random::Source
CPAN shell
perl -MCPAN -e shell install Crypt::Random::Source
For more information on module installation, please visit the detailed CPAN module installation guide.