Class: Phronomy::StateStore::Encryptor::Base
- Inherits:
-
Object
- Object
- Phronomy::StateStore::Encryptor::Base
- Defined in:
- lib/phronomy/state_store/encryptor/base.rb
Overview
Abstract base class for state encryption adapters.
Subclass and implement #encrypt and #decrypt to integrate any symmetric encryption scheme. Pass an instance to ActiveRecord via the +encryptor:+ argument.
Direct Known Subclasses
Instance Method Summary collapse
-
#decrypt(ciphertext) ⇒ String
Decrypts a ciphertext string.
-
#encrypt(plaintext) ⇒ String
Encrypts a plaintext string.
Instance Method Details
#decrypt(ciphertext) ⇒ String
Decrypts a ciphertext string.
28 29 30 |
# File 'lib/phronomy/state_store/encryptor/base.rb', line 28 def decrypt(ciphertext) raise NotImplementedError, "#{self.class}#decrypt is not implemented" end |
#encrypt(plaintext) ⇒ String
Encrypts a plaintext string.
21 22 23 |
# File 'lib/phronomy/state_store/encryptor/base.rb', line 21 def encrypt(plaintext) raise NotImplementedError, "#{self.class}#encrypt is not implemented" end |