module CarrierWave::Secure

Base library module

Constants

VERSION

Public Class Methods

cipher() click to toggle source

Uses AES in GCM mode

# File lib/carrierwave-secure.rb, line 20
def self.cipher
  secure_key = CarrierWave::Uploader::Base.send(:secure_key)
  return CarrierWave::Secure::Cipher.new(nil) if secure_key.nil?

  @cipher ||= CarrierWave::Secure::Cipher.new(Base64.decode64(secure_key))
end