Class: Chamber::Filters::DecryptionFilter

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

Constant Summary collapse

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

rubocop:disable Metrics/LineLength

%r{\A([A-Za-z0-9\+\/#]*\={0,2})#([A-Za-z0-9\+\/#]*\={0,2})#([A-Za-z0-9\+\/#]*\={0,2})\z}

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ DecryptionFilter

Returns a new instance of DecryptionFilter.



18
19
20
21
# File 'lib/chamber/filters/decryption_filter.rb', line 18

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

Class Method Details

.execute(options = {}) ⇒ Object



23
24
25
# File 'lib/chamber/filters/decryption_filter.rb', line 23

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