logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Crypt::SysRandom::XS - Perl interface to system randomness, XS version

Author

       Leon Timmermans <fawaka@gmail.com>

Backends

       At build-time, it will try the following backends in order:

       •   getrandom

           This backend is available on Linux, FreeBSD and Solaris

       •   arc4random

           This interface is supported on most BSDs and Mac.

       •   BCryptGenRandom

           This backend is available on Windows (Vista and newer)

       •   rdrand64

           This is available on "x86_64" architectures using most compilers.

       •   rdrand32

           This is available on "x86_64" and "x86" architectures using most compilers.

Description

       This module uses whatever C interface is available to procure cryptographically random data from the
       system.

Functions

random_bytes($count)
       This will fetch a string of $count random bytes containing cryptographically secure random data.

Name

       Crypt::SysRandom::XS - Perl interface to system randomness, XS version

Synopsis

        use Crypt::SysRandom::XS 'random_bytes';
        my $random = random_bytes(16);

Version

       version 0.009

See Also