Module: Cloak

Extended by:
Cloak
Included in:
Cloak
Defined in:
lib/cloak.rb,
lib/cloak/list.rb,
lib/cloak/entry.rb,
lib/cloak/version.rb

Overview

General Functions

Defined Under Namespace

Classes: Entry, List

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#verify_password(password) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/cloak.rb', line 14

def verify_password(password)
  password_file = File.expand_path("~/.cloak_password")
  cloak_password = File.new(password_file, "r")
  password_hash = cloak_password.gets
  hashed_password = BCrypt::Password.new(password_hash)

  return hashed_password == password
end