Yeah I was thinking of having the keyring bundle include one or two handlers localstore and maybe cookies for non HTML5 environments. For other scenarios the caller would supply their own implementation to init(). 

It does mean some extra unused code but it is very small. 

----- Original Message -----

| From: "Thomas Oberndörfer" <notifications@github.com>
| To: "openpgpjs/openpgpjs" <openpgpjs@noreply.github.com>
| Cc: "Robert Nelson" <robertn@the-nelsons.org>
| Sent: Monday, December 9, 2013 3:43:00 AM
| Subject: Re: [openpgpjs] Reworked keyring and added new keyring bundle (#139)

| In src/keyring/keyring.js:
| > +var openpgp = require('openpgp');
| > +
| > +/**
| > + * @class
| > + * @classdesc The class that deals with storage of the keyring. Currently
| > the only option is to use HTML5 local storage.
| > + */
| > +var keyring = function() {
| > +  this.keys = [];
| > +
| > +  /**
| > +   * Initialization routine for the keyring. This method reads the
| > +   * keyring from HTML5 local storage and initializes this instance.
| > +   * This method is called by openpgp.init().
| > +   */
| > +  function init(storeHandler) {
| > +    this.storeHandler = storeHandler ? storeHandler :
| > require('./localstore');

| I think Browserify supports only static dependencies. So localstore would
| always be resolved.

| —
| Reply to this email directly or view it on GitHub .