cloud change
This commit is contained in:
@@ -13,10 +13,13 @@ class MyAesCrypt
|
||||
# for cloud is lookup
|
||||
# for local is license_key
|
||||
# iv_salt = passphrase+"c2l"
|
||||
passphrase = passphrase + ENV['SX_KEY']
|
||||
passphrase = passphrase.gsub(".","_")
|
||||
digest = Digest::SHA256.new
|
||||
key_digest = digest.update(passphrase)
|
||||
# iv_digest = digest.update(iv_salt)
|
||||
key = key_digest.digest
|
||||
key = key_digest.digest
|
||||
|
||||
# iv = iv_digest.digest
|
||||
ENV['AES_KEY'] = cipher_key = Base64.encode64(key) # stores the key in key, and also sets the generated key on the @cipher
|
||||
ENV['AES_IV'] = cipher_iv = Base64.encode64(@cipher.random_iv) # stores the iv in iv, and also sets the generated iv on the @cipher
|
||||
|
||||
Reference in New Issue
Block a user