license updating
This commit is contained in:
@@ -39,7 +39,7 @@ class License
|
|||||||
# end
|
# end
|
||||||
##Check from local redis - if available load local otherwise get from remote
|
##Check from local redis - if available load local otherwise get from remote
|
||||||
cache_key = "#{lookup}:license:#{aes_key}:hostname"
|
cache_key = "#{lookup}:license:#{aes_key}:hostname"
|
||||||
byebug
|
|
||||||
# No Needs for current
|
# No Needs for current
|
||||||
# @secret = key
|
# @secret = key
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ class MyAesCrypt
|
|||||||
file_path = "config/shops.json"
|
file_path = "config/shops.json"
|
||||||
aes_key, aes_iv = export_key(passphrase)
|
aes_key, aes_iv = export_key(passphrase)
|
||||||
tmpHash = {
|
tmpHash = {
|
||||||
"lookup" => passphrase = {
|
"lookup" => passphrase,
|
||||||
|
"value" =>
|
||||||
|
{
|
||||||
"key" => aes_key,
|
"key" => aes_key,
|
||||||
"iv" => aes_iv
|
"iv" => aes_iv
|
||||||
}
|
}
|
||||||
@@ -39,9 +41,9 @@ class MyAesCrypt
|
|||||||
|
|
||||||
shop_data = File.read(file_path)
|
shop_data = File.read(file_path)
|
||||||
if shop_data != ""
|
if shop_data != ""
|
||||||
shop_json = JSON.parse(shop_data)
|
shop_json = JSON.parse(shop_data)
|
||||||
byebug
|
|
||||||
shop_json.each do |j|
|
shop_json.each do |j|
|
||||||
|
byebug
|
||||||
if j == passphrase
|
if j == passphrase
|
||||||
j.each do |k|
|
j.each do |k|
|
||||||
return k["key"], k["iv"]
|
return k["key"], k["iv"]
|
||||||
|
|||||||
Reference in New Issue
Block a user