module Fluent

Public Instance Methods

encrypt!(key, iv) click to toggle source
# File lib/fluent/plugin/out_aes_forward.rb, line 9
def encrypt!(key, iv)
  cipher = OpenSSL::Cipher::AES.new(256, :CBC).encrypt
  cipher.key = key
  cipher.iv = iv
  cipher.encrypt
  @data = Base64.encode64(cipher.update(@data) + cipher.final)
end