Class: Packet::Guid

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

Class Method Summary collapse

Class Method Details

.hexdigestObject



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/packet/packet_guid.rb', line 3

def self.hexdigest
  values = [
            rand(0x0010000),
            rand(0x0010000),
            rand(0x0010000),
            rand(0x0010000),
            rand(0x0010000),
            rand(0x1000000),
            rand(0x1000000),
           ]
  "%04x%04x%04x%04x%04x%06x%06x" % values
end