Sha256: 70ec7d3de389bb8e6e342fd53d23dc61dda34c3fc86ef31087686a149ee56372
Contents?: true
Size: 168 Bytes
Versions: 3
Compression:
Stored size: 168 Bytes
Contents
require 'sha1' class RandGen def self.generate len=11 srand seed = "--#{rand(999999999)}--#{Time.now}--" Digest::SHA1.hexdigest(seed)[0,len] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ploymorphic_wuid-0.5.2 | lib/wuid/rand_gen.rb |
ploymorphic_wuid-0.5.1 | lib/wuid/rand_gen.rb |
ploymorphic_wuid-0.5.0 | lib/wuid/rand_gen.rb |