def encrypt(data, key, iv, cipher_type)
      aes = OpenSSL::Cipher.new(cipher_type)
      aes.encrypt
      aes.key = key
      aes.iv  = iv unless iv.nil?
      aes.update(data) + aes.final
    end
def encrypt(data, key, iv, cipher_type)
      aes = OpenSSL::Cipher.new(cipher_type)
      aes.encrypt
      aes.key = key
      aes.iv  = iv unless iv.nil?
      aes.update(data) + aes.final
    end
rubocop:enable Naming/UncommunicativeMethodParamName
 rubocop:disable Naming/UncommunicativeMethodParamName