Module: EncryptedStore::ActiveRecord
- Defined in:
- lib/encrypted_store/active_record.rb,
lib/encrypted_store/active_record/mixin.rb,
lib/encrypted_store/active_record/encryption_key.rb,
lib/encrypted_store/active_record/encryption_key_salt.rb
Defined Under Namespace
Modules: Mixin
Classes: EncryptionKey, EncryptionKeySalt
Class Method Summary
collapse
Class Method Details
.new_key(custom_key = nil) ⇒ Object
14
15
16
|
# File 'lib/encrypted_store/active_record.rb', line 14
def new_key(custom_key = nil)
EncryptionKey.new_key(custom_key) if Mixin.descendants?
end
|
.preload_keys(amount) ⇒ Object
Preloads the most recent amount keys.
10
11
12
|
# File 'lib/encrypted_store/active_record.rb', line 10
def preload_keys(amount)
EncryptionKey.preload(amount) if Mixin.descendants?
end
|
.retire_keys(key_ids = []) ⇒ Object
18
19
20
|
# File 'lib/encrypted_store/active_record.rb', line 18
def retire_keys(key_ids = [])
EncryptionKey.retire_keys(key_ids) if Mixin.descendants?
end
|
.rotate_keys ⇒ Object
22
23
24
|
# File 'lib/encrypted_store/active_record.rb', line 22
def rotate_keys
EncryptionKey.rotate_keys if Mixin.descendants?
end
|