Module: Jekyll::EncryptAES
- Defined in:
- lib/starter_web/_plugins/filter/encryptAES.rb
Instance Method Summary collapse
Instance Method Details
#encryptAES(input) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/starter_web/_plugins/filter/encryptAES.rb', line 39 def encryptAES(input) aes = OpenSSL::Cipher::Cipher.new('aes-128-cbc') aes.encrypt aes.key = '8c841fc2e3aa2bd5' aes.iv = '0000000000000000' encrypted = aes.update(input) + aes.final encoded = Base64.encode64(encrypted) input = encoded end |