licensing

This commit is contained in:
Yan
2017-11-15 12:01:35 +06:30
parent 5ec45593de
commit 7c6153f16f
4 changed files with 58 additions and 95 deletions

View File

@@ -46,8 +46,8 @@ class ApplicationController < ActionController::Base
def current_license(url)
@license = License.new(url)
if (@license.detail_with_local_file(lookup) == true)
return @license
if (@license.detail_with_local_file() == true)
puts "RUN SA BYAR"
else
return nil
end
@@ -55,9 +55,8 @@ class ApplicationController < ActionController::Base
def cache_license(url, lookup)
@license = License.new(url, lookup)
# Export for Key
aes = AesCrypt.new
aes = MyAesCrypt.new
aes_key, aes_iv = aes.export_key(lookup)
if (@license.detail_with_local_cache(lookup, aes_key, aes_iv) == true)