lib/lockr/action/base.rb in lockr-0.4.5 vs lib/lockr/action/base.rb in lockr-0.5.0

- old
+ new

@@ -1,28 +1,7 @@ -require 'openssl' -require 'lockr/encryption/aes' -require 'lockr/fileutils' +require 'lockr/pwdmgr' class BaseAction - include FileUtils - - def save_to_vault( storelist, vault) - FileUtils.store_obj_yaml( vault, storelist) - end - - # loads the datastructure for the password sets from the file - # it looks like this: - # - # pwd_directory = { - # :id => { - # :enc => 'encrypted password store list', - # :salt => 'salt for decryption' - # } - # } - # - # decrypted_store_list = { - # :username => PasswordStore - # } - def load_from_vault( vault) - FileUtils.load_obj_yaml( vault) + def initialize( keyfile, vault) + @pwdmgr = PasswordManager.new( keyfile, vault) end end \ No newline at end of file