8 ms·
Or just use hex. > `head -c 20 /dev/random`.unpack("H*").first => "0cc57e2664051b3fd803754fd538b83317c9057f" It's reliably double the length of the input byt
by cheald 14y ago
Or just use hex.
> `head -c 20 /dev/random`.unpack("H*").first
=> "0cc57e2664051b3fd803754fd538b83317c9057f"
It's reliably double the length of the input byte array, it isn't subject to transcription errors or special character conflicts, and hex conversions exist in every stdlib ever.