def bytes(num=10)
      num = [[2048, num.to_i].min , 0].max
      numbers = []

      response = REXML::Document.new( open("https://www.fourmilab.ch/cgi-bin/Hotbits?fmt=xml&nbytes=#{num}"))
      status = REXML::XPath.first( response, "//status")
      case status.attributes['result'].to_i 
      when 200
       data = REXML::XPath.first( response, "//random-data" ).text.split
       data.each{|byte| numbers << byte.hex}
      when 503
       raise StandardError.new "#{status.text}"
      end

      numbers
    end
def bytes(num=10)
      num = [[2048, num.to_i].min , 0].max
      numbers = []

      response = REXML::Document.new( open("https://www.fourmilab.ch/cgi-bin/Hotbits?fmt=xml&nbytes=#{num}"))
      status = REXML::XPath.first( response, "//status")
      case status.attributes['result'].to_i 
      when 200
       data = REXML::XPath.first( response, "//random-data" ).text.split
       data.each{|byte| numbers << byte.hex}
      when 503
       raise StandardError.new "#{status.text}"
      end

      numbers
    end
Random bytes generator.

 It returns an Array of integers with values between 0 and 255

 It receives the number of random bytes to generate (max 2048, default 10)