Class: Chamber::Filters::EncryptionFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/chamber/filters/encryption_filter.rb

Constant Summary collapse

SECURE_KEY_TOKEN =
%r{\A_secure_}
BASE64_STRING_PATTERN =
%r{\A[A-Za-z0-9\+\/]{342}==\z}

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ EncryptionFilter

Returns a new instance of EncryptionFilter.



11
12
13
14
# File 'lib/chamber/filters/encryption_filter.rb', line 11

def initialize(options = {})
  self.encryption_key = options.fetch(:encryption_key, nil)
  self.data           = options.fetch(:data).dup
end

Class Method Details

.execute(options = {}) ⇒ Object



16
17
18
# File 'lib/chamber/filters/encryption_filter.rb', line 16

def self.execute(options = {})
  self.new(options).send(:execute)
end