Class | Mack::Utils::Crypt::DefaultWorker |
In: |
lib/mack-encryption/default_worker.rb
|
Parent: | Object |
The default worker is one that is used when no other worker is specified or the specified worker does not exist. It uses the Crypt::Rijndael library and get‘s it‘s secret key from app_config.default_secret_key
# File lib/mack-encryption/default_worker.rb, line 9 9: def initialize 10: @aes_key = ::Crypt::Rijndael.new(app_config.default_secret_key || (String.randomize(40))) 11: end
Decrypts a string using the Crypt::Rijndael library and the secret key found in app_config.default_secret_key
# File lib/mack-encryption/default_worker.rb, line 21 21: def decrypt(x) 22: @aes_key.decrypt_string(x) 23: end