Tomasz Konojacki
and 1 contributors

NAME

Bytes::Random::XS - Perl extension to generate random bytes.

SYNOPSIS

    use Bytes::Random::XS qw/random_bytes/;

    my $bytes = random_bytes( $number_of_bytes );

DESCRIPTION

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).

BENCHMARKS

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%           --

EXPORT

Nothing is exported by default. random_bytes is an optional export.

CAVEATS

GIT REPOSITORY

Bytes::Random::XS repository is hosted at github:

    https://github.com/xenu/bytes-random-xs

SEE ALSO

AUTHOR

    Tomasz Konojacki <me@xenu.pl>

COPYRIGHT AND LICENSE

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.