Class: OpenSSL::Win::Root::CRehash

Inherits:
Object
  • Object
show all
Defined in:
lib/openssl/win/root.rb

Overview

Implement c_rehash naming

Instance Method Summary collapse

Instance Method Details

#name(hash) ⇒ Object



61
62
63
64
65
66
67
# File 'lib/openssl/win/root.rb', line 61

def name hash
  hash = "%08x" % hash
  @hashes ||= {}
  names[name = "#{hash}.#{@hashes[hash] ||= 0}"] = 1
  @hashes[hash] += 1
  name
end

#namesObject



69
70
71
# File 'lib/openssl/win/root.rb', line 69

def names
  @names ||= {}
end

#unique(id) ⇒ Object



55
56
57
58
59
# File 'lib/openssl/win/root.rb', line 55

def unique id
  @seen ||= {}
  return if @seen[id]
  @seen[id] = true
end