added new option for #17
This commit is contained in:
parent
a0010422ed
commit
b1062552bf
|
@ -1,26 +1,26 @@
|
||||||
// GPG4Browsers - An OpenPGP implementation in javascript
|
// GPG4Browsers - An OpenPGP implementation in javascript
|
||||||
// Copyright (C) 2011 Recurity Labs GmbH
|
// Copyright (C) 2011 Recurity Labs GmbH
|
||||||
//
|
//
|
||||||
// This library is free software; you can redistribute it and/or
|
// This library is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
// License as published by the Free Software Foundation; either
|
// License as published by the Free Software Foundation; either
|
||||||
// version 2.1 of the License, or (at your option) any later version.
|
// version 2.1 of the License, or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// This library is distributed in the hope that it will be useful,
|
// This library is distributed in the hope that it will be useful,
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
// Lesser General Public License for more details.
|
// Lesser General Public License for more details.
|
||||||
//
|
//
|
||||||
// You should have received a copy of the GNU Lesser General Public
|
// You should have received a copy of the GNU Lesser General Public
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the GPG4Browsers config object
|
* Implementation of the GPG4Browsers config object
|
||||||
*
|
*
|
||||||
* This object contains configuration values and implements
|
* This object contains configuration values and implements
|
||||||
* storing and retrieving configuration them from HTML5 local storage.
|
* storing and retrieving configuration them from HTML5 local storage.
|
||||||
*
|
*
|
||||||
* This object can be accessed after calling openpgp.init()
|
* This object can be accessed after calling openpgp.init()
|
||||||
* using openpgp.config
|
* using openpgp.config
|
||||||
* Stored config parameters can be accessed using
|
* Stored config parameters can be accessed using
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
*/
|
*/
|
||||||
function openpgp_config() {
|
function openpgp_config() {
|
||||||
this.config = null;
|
this.config = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the default config object which is used if no
|
* the default config object which is used if no
|
||||||
* configuration was in place
|
* configuration was in place
|
||||||
|
@ -38,12 +38,14 @@ function openpgp_config() {
|
||||||
encryption_cipher: 9,
|
encryption_cipher: 9,
|
||||||
compression: 1,
|
compression: 1,
|
||||||
show_version: true,
|
show_version: true,
|
||||||
|
show_comment: true,
|
||||||
integrity_protect: true,
|
integrity_protect: true,
|
||||||
composition_behavior: 0,
|
composition_behavior: 0,
|
||||||
keyserver: "keyserver.linux.it" // "pgp.mit.edu:11371"
|
keyserver: "keyserver.linux.it" // "pgp.mit.edu:11371"
|
||||||
};
|
};
|
||||||
|
|
||||||
this.versionstring ="GPG4Browsers 0.1";
|
this.versionstring ="GPG4Browsers 0.1";
|
||||||
|
this.commentstring ="http://openpgpjs.org";
|
||||||
/**
|
/**
|
||||||
* reads the config out of the HTML5 local storage
|
* reads the config out of the HTML5 local storage
|
||||||
* and initializes the object config.
|
* and initializes the object config.
|
||||||
|
@ -59,12 +61,12 @@ function openpgp_config() {
|
||||||
else
|
else
|
||||||
this.config = cf;
|
this.config = cf;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* if enabled, debug messages will be printed
|
* if enabled, debug messages will be printed
|
||||||
*/
|
*/
|
||||||
this.debug = false;
|
this.debug = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* writes the config to HTML5 local storage
|
* writes the config to HTML5 local storage
|
||||||
* @return [void]
|
* @return [void]
|
||||||
|
@ -72,7 +74,7 @@ function openpgp_config() {
|
||||||
function write() {
|
function write() {
|
||||||
window.localStorage.setItem("config",JSON.stringify(this.config));
|
window.localStorage.setItem("config",JSON.stringify(this.config));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.read = read;
|
this.read = read;
|
||||||
this.write = write;
|
this.write = write;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user