There's a module on CPAN: Bytes::Random. The module I'm proposing provides the same functionality: my $bytes = random_bytes( $number_of_bytes );. But it does so using the random number generator provided by Math::Random::Secure, rather than Perl's native rand().
It also adds random_bytes_base64, and random_bytes_hex, which provide a MIME base64 representation, or a hex-digits representation of $number_of_bytes random bytes. It's a simple module, but useful in generating random salts, or random secrets (such as a Mojolicious application secret used in creating signed session cookies). Who knows what else people may use it for. But the important feature that sets it apart from Bytes::Random really is the choice of random number generators, which should make it suitable for purposes that wouldn't be safe if they were to rely on Perl's built-in rand(). So if there are no objections, I'd like to request the namespace Bytes::Random::Secure. Dave (davido on CPAN) -- David Oswald daosw...@gmail.com dav...@cpan.org