Crypt:...om::XS(3pm)

πŸ’œ Crypt::SysRandom::XS β€” the Perl manual, but make it cute

okay so bestie, this is Crypt::SysRandom::XS (the manual page itself goes by Crypt:...om::XS(3pm), which is giving truncated-name energy but we move πŸ’…). It's the Perl interface to system randomness, specifically the XS version β€” the one that talks straight to C. no cap, it's the real deal ✨

🌸 VERSION

version 0.011 β€” she's v0.011 and she's thriving 🫢

πŸ¦‹ SYNOPSIS

like, the whole vibe in four lines:

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

boom. sixteen random bytes. iconic. πŸ‘‘

πŸŽ€ DESCRIPTION

So here's the tea β˜• β€” this module uses whatever C interface is available to procure cryptographically random data from the system. That's it. That's the whole personality. She finds the best available system hookup and gets you the good stuff πŸ’–

πŸ”₯ FUNCTIONS

random_bytes($count)

This one will fetch you a string of $count random bytes containing cryptographically secure random data. literally all it does, and it does it flawlessly 🌟

⭐ BACKENDS

okay this part is lowkey the coolest β€” at build-time, it tries the following backends in order (first one that works wins, main character energy only 🎯):

  • 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 πŸ’»
ngl, the order matters β€” it's not just gonna pick a random (lol) backend, it goes down the list and grabs the first one that's available on your platform πŸ™ˆ

🧚 AUTHOR

Leon Timmermans <fawaka@gmail.com> β€” shoutout to the legend who made this happen πŸ‘πŸ’œ

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. fr fr, go wild 🫢


and that's the whole page bestie β€” documented with perl v5.40.2, dated 2026-07-22, and served to you on the Crypt:...om::XS(3pm) platter πŸ’…βœ¨ mwah, go generate some secure randomness, you've earned it πŸŽ€

πŸ“¦ where this page comes from