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 EzCrypto 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 = EzCrypto::Key.with_password((app_config.default_secret_key || (String.randomize(40))), Mack::VERSION) 11: end
Decrypts a string using the EzCrypto 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(x) 23: end