- GIT REPOSITORY
- SEE ALSO
- COPYRIGHT AND LICENSE
Bytes::Random::XS - Perl extension to generate random bytes.
use Bytes::Random::XS qw/random_bytes/; my $bytes = random_bytes( $number_of_bytes );
This module provides the
random_bytes function which allows you to generate specified number of random bytes. It uses exactly the same algorithm as Bytes::Random, but it's implemented in XS, so it's much faster (see "BENCHMARKS" section).
Comparison of Bytes::Random and Bytes::Random::XS performance:
# random_bytes(64) Rate B::R@0.02 B::R::X@0.01 B::R@0.02 45903/s -- -97% B::R::X@0.01 1462857/s 3087% --
Nothing is exported by default.
random_bytes is an optional export.
This module is not intended to be cryptographically secure. If that concerns you, consider using Bytes::Random::Secure instead.
Bytes::Random::XS repository is hosted at github:
Bytes::Random - pure Perl version of the module.
Bytes::Random::Secure - cryptographically secure way to generate random bytes.
Tomasz Konojacki <firstname.lastname@example.org>
Copyright (C) 2017 by Tomasz Konojacki
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.0 or, at your option, any later version of Perl 5 you may have available.