Class: UUniqueIds

Inherits:
Object
  • Object
show all
Defined in:
lib/uunique_ids/uunique_ids.rb

Class Method Summary collapse

Class Method Details

.random_createObject



12
13
14
15
16
17
18
19
# File 'lib/uunique_ids/uunique_ids.rb', line 12

def random_create
  
  raw_uuid = ::UUIDTools::UUID.random_create.to_s
  chaffed_uuid = ::EzChaff.chaff(raw_uuid)
  sha1 = ::Digest::SHA1.hexdigest(chaffed_uuid)
  return sha1
  
end