Crypt::SysRandom(3)

πŸŽ€ NAME πŸŽ€

okay so this is Crypt::SysRandom(3), aka Crypt::SysRandom β€” Perl interface to system randomness, brought to you by the User Contributed Perl Documentation crew. Bestie, it's your little doorway to system randomness, and the manual name is folded in right here like a name tag 🫢.

✨ VERSION ✨

version 0.007 β€” that's the version, no cap πŸ’….

🌸 SYNOPSIS 🌸

okay so the quickstart is literally:

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

πŸ¦‹ DESCRIPTION πŸ¦‹

This module uses whatever interface is available to procure cryptographically random data from the system. That's the whole vibe: it goes out and gets the good random stuff from the system πŸ‘‘.

πŸ”₯ FUNCTIONS πŸ”₯

random_bytes($count)

This will fetch a string of $count random bytes containing cryptographically secure random date. Yes bestie, the original says date, not data β€” I'm not fixing the receipt, I'm just reading it πŸ’€. It's still your random-bytes girlie, fr fr.

Backends

The current backends are tried in order:

  • Crypt::SysRandom::XS
  • "RtlGenRandom" using Win32::API
  • /dev/urandom

That's the order, periodt. First one that works wins the vibe check πŸ’….

πŸ‘‘ AUTHOR πŸ‘‘

Leon Timmermans <fawaka@gmail.com> β€” your author icon, slay 🫢.

This software is copyright (c) 2025 by Leon Timmermans.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

periodt, and that's the legal tea πŸ“.


with so much love from your fav random-bytes bestie πŸ’– β€” source/version: perl v5.42.0; date: 2025-07-11; page: Crypt::SysRandom(3) 🧚

πŸ“¦ where this page comes from