class Minke::Encryption::KeyLocator
Public Class Methods
new(key_store_path)
click to toggle source
# File lib/minke/encryption/key_locator.rb, line 4 def initialize(key_store_path) @key_store_path = key_store_path end
Public Instance Methods
locate_key(fingerprint)
click to toggle source
# File lib/minke/encryption/key_locator.rb, line 8 def locate_key fingerprint Dir.entries(@key_store_path).each do |f| begin full_path = "#{@key_store_path}/#{f}" key = SSHKey.new(File.read(full_path)) return full_path if key.fingerprint == fingerprint rescue end end return nil end