src/keyring/localstore.js
function LocalStore(prefix) {
  prefix = prefix || 'openpgp-';
  this.publicKeysItem = prefix + this.publicKeysItem;
  this.privateKeysItem = prefix + this.privateKeysItem;
  if (typeof window !== 'undefined' && window.localStorage) {
    this.storage = window.localStorage;
  } else {
    this.storage = new (require('node-localstorage').LocalStorage)(config.node_store);
  }
}
function LocalStore(prefix) {
  prefix = prefix || 'openpgp-';
  this.publicKeysItem = prefix + this.publicKeysItem;
  this.privateKeysItem = prefix + this.privateKeysItem;
  if (typeof window !== 'undefined' && window.localStorage) {
    this.storage = window.localStorage;
  } else {
    this.storage = new (require('node-localstorage').LocalStorage)(config.node_store);
  }
}
function LocalStore ( prefix ) { prefix = prefix || 'openpgp-' ; this . publicKeysItem = prefix + this . publicKeysItem ; this . privateKeysItem = prefix + this . privateKeysItem ; if ( typeof window !== 'undefined' && window . localStorage ) { this . storage = window . localStorage ; } else { this . storage = new ( require ( 'node-localstorage' ) . LocalStorage ) ( config . node_store ) ; } }
The class that deals with storage of the keyring.
Currently the only option is to use HTML5 local storage.
@constructor
@param {String} prefix prefix for itemnames in localstore
The class that deals with storage of the keyring . Currently the only option is to use HTML5 local storage .