def random_bytes(length)
      if (length.kind_of?(Array) || length.kind_of?(Range))
        Array.new(length.sort_by { rand }.first) { random_byte }
      else
        Array.new(length) { random_byte }
      end
    end
def random_bytes(length)
      if (length.kind_of?(Array) || length.kind_of?(Range))
        Array.new(length.sort_by { rand }.first) { random_byte }
      else
        Array.new(length) { random_byte }
      end
    end
Creates an Array of random bytes from the character set.

 @param [Integer, Array, Range] length
   The length of the Array of random bytes.

 @return [Array<Integer>]
   The randomly selected bytes.