info_vault 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcb5af9666e7bb7eb27149ef7d4b4f46b47921ab
4
- data.tar.gz: 64c3c7f73ce72d6a4a58f20cb0245142bada65c3
3
+ metadata.gz: 4415b393e0e40be6c8acf6cba1389fd52865da68
4
+ data.tar.gz: 740dd054de0c785b06e6919f4e97cb02f6241c61
5
5
  SHA512:
6
- metadata.gz: a5e9100ca0850670be96fdead27dc0127bc95362169ce945b73709c6ecb8e33bc14b9400d3b873425ebefb2675ba70013863eb795701a3aeaa8994daee9117a2
7
- data.tar.gz: f1259d1e0c87b72b8352abf4d3dde0b351799fef040da56837d87901a10af13328bdfc7984761eb94ad99be7c6204714afb5c828ab8e787f7dfb992042cdda8d
6
+ metadata.gz: 8cf306e5ce50eacc302d130363ab0a512f21c492ccb198d6f31d884760ffc4c44174aad1a8a97146410fab2564a92a588bfb84c572d923d8a143df3b8763c02d
7
+ data.tar.gz: 14f30778d2bd4fc4a669d7947edbf6f4ecdac6b69a05a7ce8cf9781e3221686e4107961c891b83435d90baacda9081ea6233330aefeffabc16db61fdc489cdbd
data/lib/info_vault.rb CHANGED
@@ -8,12 +8,12 @@ module InfoVault
8
8
  # decrypt("account","password")
9
9
  def decrypt(key,pass_phrase,file="")
10
10
  file = File.open(File.expand_path(File.join('config','protected_info.yaml')),'r') if file.empty?
11
- $config = YAML::load(file)
11
+ data = YAML::load(file)
12
12
  decrypter = OpenSSL::Cipher.new 'AES-128-CBC'
13
13
  decrypter.decrypt
14
- decrypter.pkcs5_keyivgen pass_phrase,$config[key.to_sym][:salt]
14
+ decrypter.pkcs5_keyivgen pass_phrase,data[key.to_sym][:salt]
15
15
 
16
- plain = decrypter.update $config[key.to_sym][:encrypted]
16
+ plain = decrypter.update data[key.to_sym][:encrypted]
17
17
  plain << decrypter.final
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module InfoVault
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: info_vault
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Franko