module Bundler::Random::Formatter

def random_bytes(n=nil)

prng.random_bytes #=> "m\xDC\xFC/\a\x00Uf\xB2\xB2P\xBD\xFF6S\x97"
prng = Random.new
# or
Random.random_bytes #=> "\xD8\\\xE0\xF4\r\xB2\xFC*WM\xFF\x83\x18\xF45\xB6"

require 'bundler/vendor/securerandom/lib/random/formatter'

The result may contain any byte: "\x00" - "\xff".

It may be larger in future.
If _n_ is not specified or is nil, 16 is assumed.

The argument _n_ specifies the length of the result string.

Generate a random binary string.
def random_bytes(n=nil)
  n = n ? n.to_int : 16
  gen_random(n)
end