Method: Wee::IdGenerator::Secure#next_md5

Defined in:
lib/wee/id_generator.rb

#next_md5Object



43
44
45
46
47
48
49
50
51
52
# File 'lib/wee/id_generator.rb', line 43

def next_md5
  now = Time.now
  dig = Digest::MD5.new
  dig.update(now.to_s)
  dig.update(now.usec.to_s)
  dig.update(rand(0).to_s)
  dig.update($$.to_s)
  dig.update(@salt.to_s)
  dig.digest
end