Skip to content

Instantly share code, notes, and snippets.

@ManuelBlanc
Last active July 22, 2024 14:53
Show Gist options
  • Save ManuelBlanc/794c4c16d64b1c725e0c3e840166f793 to your computer and use it in GitHub Desktop.
Save ManuelBlanc/794c4c16d64b1c725e0c3e840166f793 to your computer and use it in GitHub Desktop.
##
## Generate a list of 256 cryptographically random u64 numbers, arranged in a 64x4 grid.
##
$rng = [System.Security.Cryptography.RandomNumberGenerator]::Create()
$bytes = new-object byte[] 8
1..64 |% { $n = (1..4) |% { $rng.GetBytes($bytes); "0x{0:X16}ull," -f [BitConverter]::ToUint64($bytes,0) }; $n -join "" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment