cloud for api and doemal
This commit is contained in:
@@ -56,6 +56,21 @@ class MyAesCrypt
|
||||
return aes_key, aes_iv
|
||||
end
|
||||
|
||||
def checkKeyForAuth(from,token){
|
||||
file_path = "config/shops.json"
|
||||
shop_data = File.read(file_path)
|
||||
|
||||
shop_json = JSON.parse(shop_data)
|
||||
shop_json["data"].each do |j|
|
||||
if j["lookup"] == from
|
||||
if(j["value"]["key"] == token){
|
||||
return true
|
||||
}
|
||||
end
|
||||
end
|
||||
return false
|
||||
}
|
||||
|
||||
private
|
||||
def encrypt(data)
|
||||
cipher.encrypt
|
||||
|
||||
Reference in New Issue
Block a user