license test

This commit is contained in:
Yan
2017-11-10 18:08:48 +06:30
parent 4ad65c5480
commit 97fd7619ce
6 changed files with 15 additions and 13 deletions

View File

@@ -5,6 +5,10 @@ require 'uri'
class AESEncDec {
cipher = OpenSSL::Cipher::Cipher.new("aes-256-cbc")
def initialize
end
def self.export_key
ENV['aes_key'] = cipher.key = cipher.random_key # stores the key in key, and also sets the generated key on the cipher
ENV['aes_iv'] = cipher.iv = cipher.random_iv # stores the iv in iv, and also sets the generated iv on the cipher