Class: Keepasshttp::KeyStore::Plain
- Inherits:
-
Object
- Object
- Keepasshttp::KeyStore::Plain
- Defined in:
- lib/keepasshttp/key_store.rb
Overview
The most simple but unsecure way wo store your session key (so you don’t have to reenter the label over and over again). Use this only for testing!
Direct Known Subclasses
Constant Summary collapse
- PATH =
TODO, make the PATH adjustable
File.join(Dir.home, '.keepasshttp-ruby')
Class Method Summary collapse
Class Method Details
.available? ⇒ Boolean
40 41 42 |
# File 'lib/keepasshttp/key_store.rb', line 40 def self.available? File.exist?(PATH) && File.size(PATH).positive? end |
.load ⇒ Object
36 37 38 |
# File 'lib/keepasshttp/key_store.rb', line 36 def self.load YAML.load_file(PATH) end |
.save(params = {}) ⇒ Object
32 33 34 |
# File 'lib/keepasshttp/key_store.rb', line 32 def self.save(params = {}) File.write(PATH, params.to_yaml) end |