Class: Cript::Store
- Inherits:
-
PStore
- Object
- PStore
- Cript::Store
- Defined in:
- lib/cript/store.rb
Overview
Cript::Store provides the same functionality as PStore, except it encrypts its data store on the file system.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file, opts = {}) ⇒ Store
constructor
public_key_path private_key_path.
- #inspect ⇒ Object
Constructor Details
#initialize(file, opts = {}) ⇒ Store
public_key_path private_key_path
public_key_content public_key_path
passphrase thread_safe
20 21 22 23 24 25 |
# File 'lib/cript/store.rb', line 20 def initialize(file, opts = {}) @opts = opts @cript = Cript::Simple.new(@opts) thread_safe = !!@opts.delete(:thread_safe) super(file, thread_safe) end |
Class Method Details
.insecure(file, opts = {}) ⇒ Object
27 28 29 |
# File 'lib/cript/store.rb', line 27 def self.insecure(file, opts = {}) new(file, opts.merge({ private_key_content: INSECURE_PRIVATE_KEY })) end |
Instance Method Details
#inspect ⇒ Object
31 32 33 |
# File 'lib/cript/store.rb', line 31 def inspect "#<#{self.class.name} path=#{path}>" end |