Module: LogStash::Outputs::OSS::FileGenerator::SecureRandom
- Defined in:
- lib/logstash/outputs/oss/file_generator.rb
Class Method Summary collapse
Class Method Details
.uuid ⇒ Object
69 70 71 72 73 74 |
# File 'lib/logstash/outputs/oss/file_generator.rb', line 69 def self.uuid ary = random_bytes(16).unpack("NnnnnN") ary[2] = (ary[2] & 0x0fff) | 0x4000 ary[3] = (ary[3] & 0x3fff) | 0x8000 "%08x-%04x-%04x-%04x-%04x%08x" % ary end |