Class: Encrypt
- Inherits:
-
Object
- Object
- Encrypt
- Defined in:
- lib/encrypt_column/encrypt.rb
Class Method Summary collapse
Class Method Details
.text(plaintext, key = ENV['ENCRYPTION_KEY']) ⇒ Object
2 3 4 5 |
# File 'lib/encrypt_column/encrypt.rb', line 2 def self.text(plaintext, key = ENV['ENCRYPTION_KEY']) return raise 'Missing Encryption Key Config' if key.nil? ActiveSupport::MessageEncryptor.new(key).encrypt_and_sign(plaintext) end |