license updating

This commit is contained in:
Yan
2017-12-08 14:58:35 +06:30
parent 1ff1ddeacd
commit f57dd8ba38
2 changed files with 6 additions and 4 deletions

View File

@@ -31,7 +31,9 @@ class MyAesCrypt
file_path = "config/shops.json"
aes_key, aes_iv = export_key(passphrase)
tmpHash = {
"lookup" => passphrase = {
"lookup" => passphrase,
"value" =>
{
"key" => aes_key,
"iv" => aes_iv
}
@@ -39,9 +41,9 @@ class MyAesCrypt
shop_data = File.read(file_path)
if shop_data != ""
shop_json = JSON.parse(shop_data)
byebug
shop_json = JSON.parse(shop_data)
shop_json.each do |j|
byebug
if j == passphrase
j.each do |k|
return k["key"], k["iv"]