Sha256: 87c3220c7dfefc3c467262e0ba30905cc39f5883b9475121b5bedcd110d93a49

Contents?: true

Size: 162 Bytes

Versions: 1

Compression:

Stored size: 162 Bytes

Contents

require "securerandom"

module SecureRandom
  def self.random_bytes(n = nil)
    n = n ? n.to_int : 16
    Array.new(n) { Kernel.rand(256) }.pack("C*")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
insecure_random-1.0.0 lib/insecure_random.rb