Skip to content

Instantly share code, notes, and snippets.

@artgris
Last active March 23, 2017 13:38
Show Gist options
  • Save artgris/93974a02cea58ec207af6c0a5939ce4b to your computer and use it in GitHub Desktop.
Save artgris/93974a02cea58ec207af6c0a5939ce4b to your computer and use it in GitHub Desktop.
Cryptographically secure pseudo-random bytes into hexadecimal representation
bin2hex(random_bytes(int $length))
ex : bin2hex(random_bytes(5)) => 0d55a6fb35bbf033
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment