diff --git a/Gruntfile.js b/Gruntfile.js
index 2c6820b3..7df5a5e8 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -55,7 +55,7 @@ module.exports = function(grunt) {
uglify: {
openpgp: {
files: {
- 'dist/openpgp-min.js' : [ 'dist/openpgp_nodebug.js' ]
+ 'dist/openpgp.min.js' : [ 'dist/openpgp_nodebug.js' ]
}
},
options: {
diff --git a/doc/JXG.Util.html b/doc/JXG.Util.html
index 909d09f0..c402047a 100644
--- a/doc/JXG.Util.html
+++ b/doc/JXG.Util.html
@@ -560,7 +560,7 @@ EXAMPLES:
diff --git a/doc/aes.html b/doc/aes.html
index 370ed3a0..b0cbd65f 100644
--- a/doc/aes.html
+++ b/doc/aes.html
@@ -117,7 +117,7 @@
diff --git a/doc/aes.js.html b/doc/aes.js.html
index eb1436df..c75e6843 100644
--- a/doc/aes.js.html
+++ b/doc/aes.js.html
@@ -552,7 +552,7 @@ for (var i in types) {
diff --git a/doc/all_packets.js.html b/doc/all_packets.js.html
index ab7a7c8d..0534f8e3 100644
--- a/doc/all_packets.js.html
+++ b/doc/all_packets.js.html
@@ -107,7 +107,7 @@ for (var i in enums.packet) {
diff --git a/doc/armor.html b/doc/armor.html
index a7d14cdf..82c565d9 100644
--- a/doc/armor.html
+++ b/doc/armor.html
@@ -1364,7 +1364,7 @@ given base64 encoded checksum
diff --git a/doc/armor.js.html b/doc/armor.js.html
index a05c57c1..ffd05bd4 100644
--- a/doc/armor.js.html
+++ b/doc/armor.js.html
@@ -419,7 +419,7 @@ module.exports = {
diff --git a/doc/base64.html b/doc/base64.html
index 6ff81a78..c82006eb 100644
--- a/doc/base64.html
+++ b/doc/base64.html
@@ -393,7 +393,7 @@
diff --git a/doc/base64.js.html b/doc/base64.js.html
index 2b3058c0..40417491 100644
--- a/doc/base64.js.html
+++ b/doc/base64.js.html
@@ -142,7 +142,7 @@ module.exports = {
diff --git a/doc/blowfish.html b/doc/blowfish.html
index 0bffb55f..68f66143 100644
--- a/doc/blowfish.html
+++ b/doc/blowfish.html
@@ -111,7 +111,7 @@
diff --git a/doc/blowfish.js.html b/doc/blowfish.js.html
index 7eeebc19..d949d2cf 100644
--- a/doc/blowfish.js.html
+++ b/doc/blowfish.js.html
@@ -457,7 +457,7 @@ module.exports.blockSize = BF.prototype.blockSize = 16;
diff --git a/doc/cast5.html b/doc/cast5.html
index b1fa2c2a..369794db 100644
--- a/doc/cast5.html
+++ b/doc/cast5.html
@@ -111,7 +111,7 @@
diff --git a/doc/cast5.js.html b/doc/cast5.js.html
index 6560682b..2ce55406 100644
--- a/doc/cast5.js.html
+++ b/doc/cast5.js.html
@@ -648,7 +648,7 @@ module.exports.keySize = cast5.prototype.keySize = 16;
diff --git a/doc/cfb.html b/doc/cfb.html
index c1db831a..e1040f27 100644
--- a/doc/cfb.html
+++ b/doc/cfb.html
@@ -768,7 +768,7 @@ This will be passed to the cipherfn
diff --git a/doc/cfb.js.html b/doc/cfb.js.html
index efb95e30..3a2a0c6e 100644
--- a/doc/cfb.js.html
+++ b/doc/cfb.js.html
@@ -341,7 +341,7 @@ module.exports = {
diff --git a/doc/cipher.html b/doc/cipher.html
index de27c390..ae030fb0 100644
--- a/doc/cipher.html
+++ b/doc/cipher.html
@@ -412,7 +412,7 @@
diff --git a/doc/cleartext.js.html b/doc/cleartext.js.html
index 01f00f0a..dc2967e6 100644
--- a/doc/cleartext.js.html
+++ b/doc/cleartext.js.html
@@ -191,7 +191,7 @@ exports.readArmored = readArmored;
diff --git a/doc/compressed-Compressed.html b/doc/compressed-Compressed.html
index 8ce321a4..ec1e3c1e 100644
--- a/doc/compressed-Compressed.html
+++ b/doc/compressed-Compressed.html
@@ -686,7 +686,7 @@ read by read_packet
diff --git a/doc/compressed.html b/doc/compressed.html
index 0d91812d..c871d025 100644
--- a/doc/compressed.html
+++ b/doc/compressed.html
@@ -134,7 +134,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.
diff --git a/doc/compressed.js.html b/doc/compressed.js.html
index f0c50c3b..28561ee0 100644
--- a/doc/compressed.js.html
+++ b/doc/compressed.js.html
@@ -210,7 +210,7 @@ Compressed.prototype.compress = function () {
diff --git a/doc/config.html b/doc/config.html
index e8966537..bff00909 100644
--- a/doc/config.html
+++ b/doc/config.html
@@ -331,7 +331,7 @@
diff --git a/doc/config.js.html b/doc/config.js.html
index 5ffb0264..cba503f9 100644
--- a/doc/config.js.html
+++ b/doc/config.js.html
@@ -90,7 +90,7 @@ module.exports = {
diff --git a/doc/crypto.html b/doc/crypto.html
index ccf18e84..a85571c2 100644
--- a/doc/crypto.html
+++ b/doc/crypto.html
@@ -943,7 +943,7 @@ if elgamal encryption an array of two module:type/mpi is returned; otherwise nul
diff --git a/doc/crypto.js.html b/doc/crypto.js.html
index ed4e963b..e95f4579 100644
--- a/doc/crypto.js.html
+++ b/doc/crypto.js.html
@@ -267,7 +267,7 @@ module.exports = {
diff --git a/doc/des.html b/doc/des.html
index 2daf8bb8..ae4887ae 100644
--- a/doc/des.html
+++ b/doc/des.html
@@ -215,7 +215,7 @@
diff --git a/doc/des.js.html b/doc/des.js.html
index 8a2833b1..9025b53f 100644
--- a/doc/des.js.html
+++ b/doc/des.js.html
@@ -450,7 +450,7 @@ module.exports = {
diff --git a/doc/dsa.html b/doc/dsa.html
index f9c23fc5..1232fd96 100644
--- a/doc/dsa.html
+++ b/doc/dsa.html
@@ -123,7 +123,7 @@
diff --git a/doc/dsa.js.html b/doc/dsa.js.html
index e31c5fc4..beb986ad 100644
--- a/doc/dsa.js.html
+++ b/doc/dsa.js.html
@@ -212,7 +212,7 @@ module.exports = DSA;
diff --git a/doc/elgamal.html b/doc/elgamal.html
index 78fc3444..d6b0ed7a 100644
--- a/doc/elgamal.html
+++ b/doc/elgamal.html
@@ -121,7 +121,7 @@
diff --git a/doc/elgamal.js.html b/doc/elgamal.js.html
index e28e2cce..d608b400 100644
--- a/doc/elgamal.js.html
+++ b/doc/elgamal.js.html
@@ -101,7 +101,7 @@ module.exports = Elgamal;
diff --git a/doc/enums.js.html b/doc/enums.js.html
index d1b62ee3..6bff6113 100644
--- a/doc/enums.js.html
+++ b/doc/enums.js.html
@@ -358,7 +358,7 @@ module.exports = {
diff --git a/doc/hash.html b/doc/hash.html
index 88891600..f7321501 100644
--- a/doc/hash.html
+++ b/doc/hash.html
@@ -825,7 +825,7 @@
diff --git a/doc/index.html b/doc/index.html
index 12a8b6c5..2e9667e3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -47,7 +47,7 @@
You can download a prebuilt minified version of the library under releases.
You can also build a current version yourself:
npm install && grunt
-Then take the resulting file from resources/openpgp.min.js
to use in your project.
+Then take dist/openpgp.min.js
to use in your project.
I need some help
Mailing List
You can sign up for our mailing list and ask for help there. We've recently worked on getting our archive up and running.
@@ -173,7 +173,7 @@ for extending and developing on top of the base library.
diff --git a/doc/index.js.html b/doc/index.js.html
index e352bec6..96bfe4a9 100644
--- a/doc/index.js.html
+++ b/doc/index.js.html
@@ -46,7 +46,7 @@ module.exports = require('./config.js');
diff --git a/doc/index.js_.html b/doc/index.js_.html
index fa8b99a3..4a5b9003 100644
--- a/doc/index.js_.html
+++ b/doc/index.js_.html
@@ -66,7 +66,7 @@ for (var i in crypto)
diff --git a/doc/index.js__.html b/doc/index.js__.html
index 8cbf92da..8677ad3d 100644
--- a/doc/index.js__.html
+++ b/doc/index.js__.html
@@ -69,7 +69,7 @@ for (var i in aes) {
diff --git a/doc/index.js___.html b/doc/index.js___.html
index 5cfeda37..bca6cdbf 100644
--- a/doc/index.js___.html
+++ b/doc/index.js___.html
@@ -129,7 +129,7 @@ module.exports = {
diff --git a/doc/index.js____.html b/doc/index.js____.html
index 34ae68ae..6b7ccb96 100644
--- a/doc/index.js____.html
+++ b/doc/index.js____.html
@@ -55,7 +55,7 @@ module.exports = {
diff --git a/doc/index.js_____.html b/doc/index.js_____.html
index ff646737..d17a6c2c 100644
--- a/doc/index.js_____.html
+++ b/doc/index.js_____.html
@@ -47,7 +47,7 @@ module.exports.localstore = require('./localstore.js');
diff --git a/doc/index.js______.html b/doc/index.js______.html
index 99e76a55..96bbe43a 100644
--- a/doc/index.js______.html
+++ b/doc/index.js______.html
@@ -108,7 +108,7 @@ module.exports.Keyring = require('./keyring');
diff --git a/doc/index.js_______.html b/doc/index.js_______.html
index d0418706..baf6d543 100644
--- a/doc/index.js_______.html
+++ b/doc/index.js_______.html
@@ -55,7 +55,7 @@ for (var i in packets)
diff --git a/doc/jsbn.html b/doc/jsbn.html
index 8a1374ed..771e93e8 100644
--- a/doc/jsbn.html
+++ b/doc/jsbn.html
@@ -117,7 +117,7 @@
diff --git a/doc/jsbn.js.html b/doc/jsbn.js.html
index 137906dc..82ed9c20 100644
--- a/doc/jsbn.js.html
+++ b/doc/jsbn.js.html
@@ -1751,7 +1751,7 @@ BigInteger.prototype.square = bnSquare;
diff --git a/doc/jxg.js.html b/doc/jxg.js.html
index 8b9f7449..450729ed 100644
--- a/doc/jxg.js.html
+++ b/doc/jxg.js.html
@@ -1303,7 +1303,7 @@ module.exports = JXG;
diff --git a/doc/key.js.html b/doc/key.js.html
index 883a01df..5c9c56d6 100644
--- a/doc/key.js.html
+++ b/doc/key.js.html
@@ -809,7 +809,7 @@ exports.generate = generate;
diff --git a/doc/keyid-Keyid.html b/doc/keyid-Keyid.html
index 85a949f5..80f06a12 100644
--- a/doc/keyid-Keyid.html
+++ b/doc/keyid-Keyid.html
@@ -260,7 +260,7 @@
diff --git a/doc/keyid.html b/doc/keyid.html
index 9ee9b18c..642c2228 100644
--- a/doc/keyid.html
+++ b/doc/keyid.html
@@ -131,7 +131,7 @@ formed.
diff --git a/doc/keyid.js.html b/doc/keyid.js.html
index 1eb3a8bd..c696fde8 100644
--- a/doc/keyid.js.html
+++ b/doc/keyid.js.html
@@ -108,7 +108,7 @@ module.exports.mapToHex = function (keyId) {
diff --git a/doc/keyring-Keyring.html b/doc/keyring-Keyring.html
index 23f93c62..f168e72e 100644
--- a/doc/keyring-Keyring.html
+++ b/doc/keyring-Keyring.html
@@ -1297,7 +1297,7 @@ keyring from HTML5 local storage and initializes this instance.
diff --git a/doc/keyring.html b/doc/keyring.html
index d88a1e12..3881d88b 100644
--- a/doc/keyring.html
+++ b/doc/keyring.html
@@ -828,7 +828,7 @@
diff --git a/doc/keyring.js.html b/doc/keyring.js.html
index 9189aedb..bd21d815 100644
--- a/doc/keyring.js.html
+++ b/doc/keyring.js.html
@@ -48,7 +48,7 @@
* @module keyring/keyring
*/
-var openpgp = require('openpgp');
+var openpgp = require('../');
/**
* Callback to check if a key matches the input
@@ -230,7 +230,7 @@ Keyring.prototype.exportPublicKey = function (index) {
diff --git a/doc/literal-Literal.html b/doc/literal-Literal.html
index 2d0a210a..bbd4baad 100644
--- a/doc/literal-Literal.html
+++ b/doc/literal-Literal.html
@@ -915,7 +915,7 @@ will be normalized to \r\n and by default text is converted to UTF8
diff --git a/doc/literal.html b/doc/literal.html
index fc435a7c..314cd785 100644
--- a/doc/literal.html
+++ b/doc/literal.html
@@ -131,7 +131,7 @@ is not to be further interpreted.
diff --git a/doc/literal.js.html b/doc/literal.js.html
index 8930bdcc..583b084f 100644
--- a/doc/literal.js.html
+++ b/doc/literal.js.html
@@ -171,7 +171,7 @@ Literal.prototype.write = function () {
diff --git a/doc/localStorage-LocalStorage.html b/doc/localStorage-LocalStorage.html
index 09d526c0..c8e4989c 100644
--- a/doc/localStorage-LocalStorage.html
+++ b/doc/localStorage-LocalStorage.html
@@ -283,7 +283,7 @@ if config is null the default config will be used
diff --git a/doc/localStorage.html b/doc/localStorage.html
index 196500fc..acf6f3e2 100644
--- a/doc/localStorage.html
+++ b/doc/localStorage.html
@@ -120,7 +120,7 @@
diff --git a/doc/localStorage.js.html b/doc/localStorage.js.html
index 46bb9928..efee00ea 100644
--- a/doc/localStorage.js.html
+++ b/doc/localStorage.js.html
@@ -74,7 +74,7 @@ LocalStorage.prototype.write = function () {
diff --git a/doc/localstore.html b/doc/localstore.html
index 118ede04..c30f97df 100644
--- a/doc/localstore.html
+++ b/doc/localstore.html
@@ -119,7 +119,7 @@
diff --git a/doc/localstore.js.html b/doc/localstore.js.html
index 26a4c6e2..e91ddeda 100644
--- a/doc/localstore.js.html
+++ b/doc/localstore.js.html
@@ -49,9 +49,14 @@
*/
module.exports = LocalStore;
-var openpgp = require('openpgp');
+var openpgp = require('../');
function LocalStore() {
+ if (typeof window != 'undefined' && window.localStorage) {
+ this.storage = window.localStorage;
+ } else {
+ this.storage = new (require('node-localstorage').LocalStorage)(openpgp.config.node_store);
+ }
}
/**
@@ -59,16 +64,7 @@ function LocalStore() {
* @return {Array<module:key~Key>} array of keys retrieved from localstore
*/
LocalStore.prototype.load = function () {
- var storage = null;
- try {
- storage = window.localStorage;
- } catch (e) {
- }
-
- if (storage === null) {
- storage = new (require('node-localstorage').LocalStorage)(openpgp.config.node_store);
- }
- var armoredKeys = JSON.parse(storage.getItem("armoredKeys"));
+ var armoredKeys = JSON.parse(this.storage.getItem('armoredKeys'));
var keys = [];
if (armoredKeys !== null && armoredKeys.length !== 0) {
var key;
@@ -90,7 +86,7 @@ LocalStore.prototype.store = function (keys) {
for (var i = 0; i < keys.length; i++) {
armoredKeys.push(keys[i].armor());
}
- window.localStorage.setItem("armoredKeys", JSON.stringify(armoredKeys));
+ this.storage.setItem('armoredKeys', JSON.stringify(armoredKeys));
};
@@ -108,7 +104,7 @@ LocalStore.prototype.store = function (keys) {
diff --git a/doc/marker-Marker.html b/doc/marker-Marker.html
index 61e68f80..acc6cf79 100644
--- a/doc/marker-Marker.html
+++ b/doc/marker-Marker.html
@@ -329,7 +329,7 @@
diff --git a/doc/marker.html b/doc/marker.html
index 41da0c59..822874ba 100644
--- a/doc/marker.html
+++ b/doc/marker.html
@@ -127,7 +127,7 @@ Such a packet MUST be ignored when received.
diff --git a/doc/marker.js.html b/doc/marker.js.html
index bfc885bd..65a3b22d 100644
--- a/doc/marker.js.html
+++ b/doc/marker.js.html
@@ -98,7 +98,7 @@ Marker.prototype.read = function (bytes) {
diff --git a/doc/md5.html b/doc/md5.html
index fc4d4946..a3285294 100644
--- a/doc/md5.html
+++ b/doc/md5.html
@@ -235,7 +235,7 @@
diff --git a/doc/md5.js.html b/doc/md5.js.html
index 099bb7b0..410150b0 100644
--- a/doc/md5.js.html
+++ b/doc/md5.js.html
@@ -258,7 +258,7 @@ if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
diff --git a/doc/message.js.html b/doc/message.js.html
index bc976c77..840f67c3 100644
--- a/doc/message.js.html
+++ b/doc/message.js.html
@@ -357,7 +357,7 @@ exports.fromBinary = fromBinary;
diff --git a/doc/module-cleartext-CleartextMessage.html b/doc/module-cleartext-CleartextMessage.html
index 0e50a565..0086b924 100644
--- a/doc/module-cleartext-CleartextMessage.html
+++ b/doc/module-cleartext-CleartextMessage.html
@@ -747,7 +747,7 @@ See http://tools.ietf.org
diff --git a/doc/module-cleartext.html b/doc/module-cleartext.html
index 664b6f31..5f3d7573 100644
--- a/doc/module-cleartext.html
+++ b/doc/module-cleartext.html
@@ -273,7 +273,7 @@
diff --git a/doc/module-config.html b/doc/module-config.html
index b1785df5..b87babc2 100644
--- a/doc/module-config.html
+++ b/doc/module-config.html
@@ -118,7 +118,7 @@
diff --git a/doc/module-crypto.html b/doc/module-crypto.html
index 83d384cd..545d9c95 100644
--- a/doc/module-crypto.html
+++ b/doc/module-crypto.html
@@ -521,7 +521,7 @@
diff --git a/doc/module-enums.html b/doc/module-enums.html
index 9e4e53cc..097246b8 100644
--- a/doc/module-enums.html
+++ b/doc/module-enums.html
@@ -4533,7 +4533,7 @@ document) that cannot include a target subpacket.
diff --git a/doc/module-key-Key.html b/doc/module-key-Key.html
index 77d43c6a..faff0c84 100644
--- a/doc/module-key-Key.html
+++ b/doc/module-key-Key.html
@@ -2258,7 +2258,7 @@ and valid self signature
diff --git a/doc/module-key-SubKey.html b/doc/module-key-SubKey.html
index f233b9ef..5cdce363 100644
--- a/doc/module-key-SubKey.html
+++ b/doc/module-key-SubKey.html
@@ -600,7 +600,7 @@ and valid binding signature
diff --git a/doc/module-key-User.html b/doc/module-key-User.html
index 4523e1c9..074a59bb 100644
--- a/doc/module-key-User.html
+++ b/doc/module-key-User.html
@@ -682,7 +682,7 @@ and validity of self signature
diff --git a/doc/module-key.html b/doc/module-key.html
index b0ddff93..d5947c6a 100644
--- a/doc/module-key.html
+++ b/doc/module-key.html
@@ -485,7 +485,7 @@ Primary and subkey will be of same type.
diff --git a/doc/module-keyring.html b/doc/module-keyring.html
index c610f3cf..5766cee1 100644
--- a/doc/module-keyring.html
+++ b/doc/module-keyring.html
@@ -118,7 +118,7 @@
diff --git a/doc/module-message-Message.html b/doc/module-message-Message.html
index 713b10aa..359a780c 100644
--- a/doc/module-message-Message.html
+++ b/doc/module-message-Message.html
@@ -1303,7 +1303,7 @@ See http://tools.ietf.
diff --git a/doc/module-message.html b/doc/module-message.html
index b7375c07..355cff31 100644
--- a/doc/module-message.html
+++ b/doc/module-message.html
@@ -553,7 +553,7 @@
diff --git a/doc/module-openpgp.html b/doc/module-openpgp.html
index 461d157e..a56beb5a 100644
--- a/doc/module-openpgp.html
+++ b/doc/module-openpgp.html
@@ -2109,7 +2109,7 @@ Primary and subkey will be of same type.
diff --git a/doc/module-packet.html b/doc/module-packet.html
index 8bd64d5f..0fd117b3 100644
--- a/doc/module-packet.html
+++ b/doc/module-packet.html
@@ -1368,7 +1368,7 @@
diff --git a/doc/module-util.html b/doc/module-util.html
index 8e2523a5..0568f341 100644
--- a/doc/module-util.html
+++ b/doc/module-util.html
@@ -2006,7 +2006,7 @@ the same as bin2str.
diff --git a/doc/mpi-MPI.html b/doc/mpi-MPI.html
index cbc4f481..cf8c8a53 100644
--- a/doc/mpi-MPI.html
+++ b/doc/mpi-MPI.html
@@ -431,7 +431,7 @@
diff --git a/doc/mpi.html b/doc/mpi.html
index 061b2314..3c8a486b 100644
--- a/doc/mpi.html
+++ b/doc/mpi.html
@@ -135,7 +135,7 @@ actual integer.
diff --git a/doc/mpi.js.html b/doc/mpi.js.html
index bc1c1c82..01911f70 100644
--- a/doc/mpi.js.html
+++ b/doc/mpi.js.html
@@ -143,7 +143,7 @@ MPI.prototype.fromBigInteger = function (bn) {
diff --git a/doc/one_pass_signature-OnePassSignature.html b/doc/one_pass_signature-OnePassSignature.html
index ee7132db..25fd7e6d 100644
--- a/doc/one_pass_signature-OnePassSignature.html
+++ b/doc/one_pass_signature-OnePassSignature.html
@@ -373,7 +373,7 @@
diff --git a/doc/one_pass_signature.html b/doc/one_pass_signature.html
index 1d864ea3..f8c04df6 100644
--- a/doc/one_pass_signature.html
+++ b/doc/one_pass_signature.html
@@ -134,7 +134,7 @@ can compute the entire signed message in one pass.
diff --git a/doc/one_pass_signature.js.html b/doc/one_pass_signature.js.html
index b77e764e..60f60ac9 100644
--- a/doc/one_pass_signature.js.html
+++ b/doc/one_pass_signature.js.html
@@ -137,7 +137,7 @@ OnePassSignature.prototype.write = function () {
diff --git a/doc/openpgp.js.html b/doc/openpgp.js.html
index 2ba841ca..877e6d57 100644
--- a/doc/openpgp.js.html
+++ b/doc/openpgp.js.html
@@ -205,7 +205,7 @@ exports.generateKeyPair = generateKeyPair;
diff --git a/doc/packet.html b/doc/packet.html
index 50ac93d2..2ea4f4eb 100644
--- a/doc/packet.html
+++ b/doc/packet.html
@@ -774,7 +774,7 @@ string
diff --git a/doc/packet.js.html b/doc/packet.js.html
index 10219f53..d6f91f5d 100644
--- a/doc/packet.js.html
+++ b/doc/packet.js.html
@@ -304,7 +304,7 @@ module.exports = {
diff --git a/doc/packetlist-Packetlist.html b/doc/packetlist-Packetlist.html
index 99fee218..ce1f3aa3 100644
--- a/doc/packetlist-Packetlist.html
+++ b/doc/packetlist-Packetlist.html
@@ -1042,7 +1042,7 @@ class instance.
diff --git a/doc/packetlist.html b/doc/packetlist.html
index 0f5cc447..4c67751b 100644
--- a/doc/packetlist.html
+++ b/doc/packetlist.html
@@ -132,7 +132,7 @@ are stored as numerical indices.
diff --git a/doc/packetlist.js.html b/doc/packetlist.js.html
index 312d5ad0..9a82e270 100644
--- a/doc/packetlist.js.html
+++ b/doc/packetlist.js.html
@@ -218,7 +218,7 @@ Packetlist.prototype.concat = function (packetlist) {
diff --git a/doc/pkcs1.html b/doc/pkcs1.html
index 638b0ecf..d47318d1 100644
--- a/doc/pkcs1.html
+++ b/doc/pkcs1.html
@@ -185,7 +185,7 @@
diff --git a/doc/pkcs1.js.html b/doc/pkcs1.js.html
index 236d2c3c..399c11c0 100644
--- a/doc/pkcs1.js.html
+++ b/doc/pkcs1.js.html
@@ -186,7 +186,7 @@ module.exports = {
diff --git a/doc/public_key-PublicKey.html b/doc/public_key-PublicKey.html
index 3b1f16eb..fdae6207 100644
--- a/doc/public_key-PublicKey.html
+++ b/doc/public_key-PublicKey.html
@@ -945,7 +945,7 @@ header: [string] OpenPGP packet header, string: [string] header+body}
diff --git a/doc/public_key.html b/doc/public_key.html
index cadf1aaa..952116f5 100644
--- a/doc/public_key.html
+++ b/doc/public_key.html
@@ -296,7 +296,7 @@
diff --git a/doc/public_key.js.html b/doc/public_key.js.html
index d6731eb8..32cb6afb 100644
--- a/doc/public_key.js.html
+++ b/doc/public_key.js.html
@@ -226,7 +226,7 @@ PublicKey.prototype.getFingerprint = function () {
diff --git a/doc/public_key_.html b/doc/public_key_.html
index 092d67c4..5ebfec44 100644
--- a/doc/public_key_.html
+++ b/doc/public_key_.html
@@ -139,7 +139,7 @@ major versions. Consequently, this section is complex.
diff --git a/doc/public_key_encrypted_session_key-PublicKeyEncryptedSessionKey.html b/doc/public_key_encrypted_session_key-PublicKeyEncryptedSessionKey.html
index 68a4d6cf..bfa99fe0 100644
--- a/doc/public_key_encrypted_session_key-PublicKeyEncryptedSessionKey.html
+++ b/doc/public_key_encrypted_session_key-PublicKeyEncryptedSessionKey.html
@@ -767,7 +767,7 @@ packets (tag 1)
diff --git a/doc/public_key_encrypted_session_key.html b/doc/public_key_encrypted_session_key.html
index 0ce5afd8..74cad0ce 100644
--- a/doc/public_key_encrypted_session_key.html
+++ b/doc/public_key_encrypted_session_key.html
@@ -146,7 +146,7 @@ decrypt the message.
diff --git a/doc/public_key_encrypted_session_key.js.html b/doc/public_key_encrypted_session_key.js.html
index 8c6ccd8f..529aeffa 100644
--- a/doc/public_key_encrypted_session_key.js.html
+++ b/doc/public_key_encrypted_session_key.js.html
@@ -225,7 +225,7 @@ PublicKeyEncryptedSessionKey.prototype.decrypt = function (key) {
diff --git a/doc/public_subkey-PublicSubkey.html b/doc/public_subkey-PublicSubkey.html
index 9db5ae89..44245907 100644
--- a/doc/public_subkey-PublicSubkey.html
+++ b/doc/public_subkey-PublicSubkey.html
@@ -145,7 +145,7 @@
diff --git a/doc/public_subkey.html b/doc/public_subkey.html
index 11c3b0b0..b4406d08 100644
--- a/doc/public_subkey.html
+++ b/doc/public_subkey.html
@@ -124,7 +124,7 @@
diff --git a/doc/public_subkey.js.html b/doc/public_subkey.js.html
index 9f5aff26..ce6e837e 100644
--- a/doc/public_subkey.js.html
+++ b/doc/public_subkey.js.html
@@ -77,7 +77,7 @@ PublicSubkey.prototype.constructor = PublicSubkey;
diff --git a/doc/random.html b/doc/random.html
index 9f64a747..6eeb9820 100644
--- a/doc/random.html
+++ b/doc/random.html
@@ -214,7 +214,7 @@
Source:
@@ -353,7 +353,7 @@
Source:
@@ -492,7 +492,7 @@
Source:
@@ -631,7 +631,7 @@
Source:
@@ -771,7 +771,7 @@
Source:
@@ -840,7 +840,7 @@
diff --git a/doc/random.js.html b/doc/random.js.html
index 22732fdf..898e0a76 100644
--- a/doc/random.js.html
+++ b/doc/random.js.html
@@ -52,10 +52,8 @@
var type_mpi = require('../type/mpi.js');
var nodeCrypto = null;
-if (typeof window === undefined) {}
-try {
+if (typeof window === 'undefined') {
nodeCrypto = require('crypto');
-} catch (e) {
}
module.exports = {
@@ -108,9 +106,9 @@ module.exports = {
* @param {Uint32Array} buf
*/
getRandomValues: function(buf) {
- try {
+ if (nodeCrypto === null) {
window.crypto.getRandomValues(buf);
- } catch (e) {
+ } else {
var bytes = nodeCrypto.randomBytes(4);
buf[0] = (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3];
}
@@ -170,7 +168,7 @@ module.exports = {
diff --git a/doc/ripe-md.html b/doc/ripe-md.html
index 21d85f28..5ac8c7f5 100644
--- a/doc/ripe-md.html
+++ b/doc/ripe-md.html
@@ -111,7 +111,7 @@
diff --git a/doc/ripe-md.js.html b/doc/ripe-md.js.html
index c1d096db..b98d2b1f 100644
--- a/doc/ripe-md.js.html
+++ b/doc/ripe-md.js.html
@@ -338,7 +338,7 @@ module.exports = RMDstring;
diff --git a/doc/rsa.html b/doc/rsa.html
index 57ef4e75..ad399bbe 100644
--- a/doc/rsa.html
+++ b/doc/rsa.html
@@ -121,7 +121,7 @@
diff --git a/doc/rsa.js.html b/doc/rsa.js.html
index 672ad641..abe1e8fe 100644
--- a/doc/rsa.js.html
+++ b/doc/rsa.js.html
@@ -193,7 +193,7 @@ module.exports = RSA;
diff --git a/doc/s2k-S2K.html b/doc/s2k-S2K.html
index fa378c7d..975ec997 100644
--- a/doc/s2k-S2K.html
+++ b/doc/s2k-S2K.html
@@ -702,7 +702,7 @@ hashAlgorithm hash length
diff --git a/doc/s2k.html b/doc/s2k.html
index bb11abcf..e88f6286 100644
--- a/doc/s2k.html
+++ b/doc/s2k.html
@@ -136,7 +136,7 @@ symmetrically encrypted messages.
diff --git a/doc/s2k.js.html b/doc/s2k.js.html
index 34699057..27640374 100644
--- a/doc/s2k.js.html
+++ b/doc/s2k.js.html
@@ -221,7 +221,7 @@ S2K.prototype.produce_key = function (passphrase, numBytes) {
diff --git a/doc/secret_key-SecretKey.html b/doc/secret_key-SecretKey.html
index aeda3295..68d61777 100644
--- a/doc/secret_key-SecretKey.html
+++ b/doc/secret_key-SecretKey.html
@@ -616,7 +616,7 @@ to key specifier
diff --git a/doc/secret_key.html b/doc/secret_key.html
index 7e916906..6ccce91a 100644
--- a/doc/secret_key.html
+++ b/doc/secret_key.html
@@ -141,7 +141,7 @@ major versions. Consequently, this section is complex.
diff --git a/doc/secret_key.js.html b/doc/secret_key.js.html
index 34f30513..a9b6e166 100644
--- a/doc/secret_key.js.html
+++ b/doc/secret_key.js.html
@@ -308,7 +308,7 @@ SecretKey.prototype.generate = function (bits) {
diff --git a/doc/secret_subkey-SecretSubkey.html b/doc/secret_subkey-SecretSubkey.html
index 6cae10d2..6afd0166 100644
--- a/doc/secret_subkey-SecretSubkey.html
+++ b/doc/secret_subkey-SecretSubkey.html
@@ -145,7 +145,7 @@
diff --git a/doc/secret_subkey.html b/doc/secret_subkey.html
index 8ab690c7..8570ef13 100644
--- a/doc/secret_subkey.html
+++ b/doc/secret_subkey.html
@@ -124,7 +124,7 @@
diff --git a/doc/secret_subkey.js.html b/doc/secret_subkey.js.html
index 42dfae90..01a44405 100644
--- a/doc/secret_subkey.js.html
+++ b/doc/secret_subkey.js.html
@@ -77,7 +77,7 @@ SecretSubkey.prototype.constructor = SecretSubkey;
diff --git a/doc/sha.html b/doc/sha.html
index 9a6907bd..0d3cb6f5 100644
--- a/doc/sha.html
+++ b/doc/sha.html
@@ -460,7 +460,7 @@
diff --git a/doc/sha.js.html b/doc/sha.js.html
index 91a6b226..5590510f 100644
--- a/doc/sha.js.html
+++ b/doc/sha.js.html
@@ -1166,7 +1166,7 @@ module.exports = {
diff --git a/doc/signature-Signature.html b/doc/signature-Signature.html
index 9efd359b..81f6c8b7 100644
--- a/doc/signature-Signature.html
+++ b/doc/signature-Signature.html
@@ -818,7 +818,7 @@
diff --git a/doc/signature.html b/doc/signature.html
index 2aac3640..992967c2 100644
--- a/doc/signature.html
+++ b/doc/signature.html
@@ -581,7 +581,7 @@ integers which is used to sign the data
diff --git a/doc/signature.js.html b/doc/signature.js.html
index 6901c1a5..82e9306f 100644
--- a/doc/signature.js.html
+++ b/doc/signature.js.html
@@ -154,7 +154,7 @@ module.exports = {
diff --git a/doc/signature.js_.html b/doc/signature.js_.html
index a9f4e7ca..d0161b62 100644
--- a/doc/signature.js_.html
+++ b/doc/signature.js_.html
@@ -681,7 +681,7 @@ Signature.prototype.isExpired = function () {
diff --git a/doc/signature_.html b/doc/signature_.html
index f3f9a041..369f151a 100644
--- a/doc/signature_.html
+++ b/doc/signature_.html
@@ -308,7 +308,7 @@ in RFC4880 Section
diff --git a/doc/sym_encrypted_integrity_protected-SymEncryptedIntegrityProtected.html b/doc/sym_encrypted_integrity_protected-SymEncryptedIntegrityProtected.html
index bdf0df17..feb06762 100644
--- a/doc/sym_encrypted_integrity_protected-SymEncryptedIntegrityProtected.html
+++ b/doc/sym_encrypted_integrity_protected-SymEncryptedIntegrityProtected.html
@@ -430,7 +430,7 @@ have been called before
diff --git a/doc/sym_encrypted_integrity_protected.html b/doc/sym_encrypted_integrity_protected.html
index 65a44401..670b0b6c 100644
--- a/doc/sym_encrypted_integrity_protected.html
+++ b/doc/sym_encrypted_integrity_protected.html
@@ -136,7 +136,7 @@ packet.
diff --git a/doc/sym_encrypted_integrity_protected.js.html b/doc/sym_encrypted_integrity_protected.js.html
index 08f25fcc..3634b362 100644
--- a/doc/sym_encrypted_integrity_protected.js.html
+++ b/doc/sym_encrypted_integrity_protected.js.html
@@ -164,7 +164,7 @@ SymEncryptedIntegrityProtected.prototype.decrypt = function (sessionKeyAlgorithm
diff --git a/doc/sym_encrypted_session_key-SymEncryptedSessionKey.html b/doc/sym_encrypted_session_key-SymEncryptedSessionKey.html
index 158b73d6..7d3cc314 100644
--- a/doc/sym_encrypted_session_key-SymEncryptedSessionKey.html
+++ b/doc/sym_encrypted_session_key-SymEncryptedSessionKey.html
@@ -421,7 +421,7 @@ packets (tag 1)
diff --git a/doc/sym_encrypted_session_key.html b/doc/sym_encrypted_session_key.html
index 728ee9af..41e4ed76 100644
--- a/doc/sym_encrypted_session_key.html
+++ b/doc/sym_encrypted_session_key.html
@@ -142,7 +142,7 @@ decrypt the message.
diff --git a/doc/sym_encrypted_session_key.js.html b/doc/sym_encrypted_session_key.js.html
index ee7bef96..8bb5c304 100644
--- a/doc/sym_encrypted_session_key.js.html
+++ b/doc/sym_encrypted_session_key.js.html
@@ -183,7 +183,7 @@ SymEncryptedSessionKey.prototype.encrypt = function(passphrase) {
diff --git a/doc/symmetrically_encrypted-SymmetricallyEncrypted.html b/doc/symmetrically_encrypted-SymmetricallyEncrypted.html
index 158931d2..c4cd4a04 100644
--- a/doc/symmetrically_encrypted-SymmetricallyEncrypted.html
+++ b/doc/symmetrically_encrypted-SymmetricallyEncrypted.html
@@ -352,7 +352,7 @@
diff --git a/doc/symmetrically_encrypted.html b/doc/symmetrically_encrypted.html
index f6711887..ead400bd 100644
--- a/doc/symmetrically_encrypted.html
+++ b/doc/symmetrically_encrypted.html
@@ -132,7 +132,7 @@ that form whole OpenPGP messages).
diff --git a/doc/symmetrically_encrypted.js.html b/doc/symmetrically_encrypted.js.html
index f5432360..063cfdc7 100644
--- a/doc/symmetrically_encrypted.js.html
+++ b/doc/symmetrically_encrypted.js.html
@@ -114,7 +114,7 @@ SymmetricallyEncrypted.prototype.encrypt = function (algo, key) {
diff --git a/doc/trust-Trust.html b/doc/trust-Trust.html
index 96793eeb..e2f5d1f2 100644
--- a/doc/trust-Trust.html
+++ b/doc/trust-Trust.html
@@ -139,7 +139,7 @@
diff --git a/doc/trust.html b/doc/trust.html
index e26e5c41..2f50309f 100644
--- a/doc/trust.html
+++ b/doc/trust.html
@@ -118,7 +118,7 @@
diff --git a/doc/trust.js.html b/doc/trust.js.html
index 3adc63c6..e74f126f 100644
--- a/doc/trust.js.html
+++ b/doc/trust.js.html
@@ -52,7 +52,7 @@ function Trust() {
diff --git a/doc/twofish.html b/doc/twofish.html
index a5d40328..83099e0c 100644
--- a/doc/twofish.html
+++ b/doc/twofish.html
@@ -111,7 +111,7 @@
diff --git a/doc/twofish.js.html b/doc/twofish.js.html
index e2948c04..d318e0bb 100644
--- a/doc/twofish.js.html
+++ b/doc/twofish.js.html
@@ -423,7 +423,7 @@ module.exports.blockSize = TF.prototype.blockSize = 16;
diff --git a/doc/user_attribute-UserAttribute.html b/doc/user_attribute-UserAttribute.html
index 6862662d..36aa6d9f 100644
--- a/doc/user_attribute-UserAttribute.html
+++ b/doc/user_attribute-UserAttribute.html
@@ -260,7 +260,7 @@
diff --git a/doc/user_attribute.html b/doc/user_attribute.html
index 9b04132f..41c9bf65 100644
--- a/doc/user_attribute.html
+++ b/doc/user_attribute.html
@@ -135,7 +135,7 @@ module packet/user_attribute
diff --git a/doc/user_attribute.js.html b/doc/user_attribute.js.html
index bf97158b..827e953a 100644
--- a/doc/user_attribute.js.html
+++ b/doc/user_attribute.js.html
@@ -104,7 +104,7 @@ UserAttribute.prototype.read = function(bytes) {
diff --git a/doc/userid-Userid.html b/doc/userid-Userid.html
index cb6a6927..fc9efdbb 100644
--- a/doc/userid-Userid.html
+++ b/doc/userid-Userid.html
@@ -420,7 +420,7 @@ John Doe
diff --git a/doc/userid.html b/doc/userid.html
index e0924e6e..89d20754 100644
--- a/doc/userid.html
+++ b/doc/userid.html
@@ -132,7 +132,7 @@ specifies the length of the User ID.
diff --git a/doc/userid.js.html b/doc/userid.js.html
index 763e5380..720bf3ec 100644
--- a/doc/userid.js.html
+++ b/doc/userid.js.html
@@ -100,7 +100,7 @@ Userid.prototype.write = function () {
diff --git a/doc/util.js.html b/doc/util.js.html
index 51abe609..e5b5ad05 100644
--- a/doc/util.js.html
+++ b/doc/util.js.html
@@ -345,7 +345,7 @@ module.exports = {
diff --git a/package.json b/package.json
index 66e225fa..1d1f5cb1 100644
--- a/package.json
+++ b/package.json
@@ -4,12 +4,12 @@
"engines": {
"node": ">=0.8"
},
- "main": "dist/openpgp-min.js",
+ "main": "src/index.js",
"directories": {
"lib": "dist"
},
"files": [
- "dist/openpgp-min.js",
+ "src/",
"test/unittests.js", "test/general", "test/crypto"
],
"scripts": {