Module: Istat::Utils
- Defined in:
- lib/istat/utils.rb
Class Method Summary collapse
-
.uuid(size = 16) ⇒ String
generate a pseudo random uuid based on openssl random.
Class Method Details
.uuid(size = 16) ⇒ String
generate a pseudo random uuid based on openssl random
29 30 31 32 33 |
# File 'lib/istat/utils.rb', line 29 def self.uuid(size = 16) OpenSSL::Random.random_bytes(size).unpack("C" * size).map do |char| "%02x" % char end.join end |