Sha256: 158b6a6318573592ae5fd1ef2612ab455474fc870616905a3fe59bda37122b6f
Contents?: true
Size: 483 Bytes
Versions: 2
Compression:
Stored size: 483 Bytes
Contents
require 'uuidtools' class RFlow module Util # Generate a UUID based on either the SHA1 of a seed string (v5) with a # 'zero' UUID namespace, or using a purely random generation # (v4) if no seed string is present def generate_uuid_string(seed=nil) uuid = if seed UUIDTools::UUID.sha1_create(UUIDTools::UUID.parse_int(0), seed) else UUIDTools::UUID.random_create end uuid.to_s end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rflow-1.0.0a1 | lib/rflow/util.rb |
rflow-0.0.5 | lib/rflow/util.rb |