add AES key
This commit is contained in:
15
app/models/AESEncDec.rb
Normal file
15
app/models/AESEncDec.rb
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
require 'openssl'
|
||||||
|
require 'base64'
|
||||||
|
require 'uri'
|
||||||
|
|
||||||
|
class AESEncDec {
|
||||||
|
cipher = OpenSSL::Cipher::Cipher.new("aes-256-cbc")
|
||||||
|
|
||||||
|
def encrypt
|
||||||
|
cipher.encrypt
|
||||||
|
end
|
||||||
|
|
||||||
|
def decrypt
|
||||||
|
|
||||||
|
end
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user