Add web worker support. Load the whole library in a web worker

and make the high-level API accessible from an asynchronous proxy.
Entropy is seeded to worker on each generateKeyPair() call.
Allow serialization of packets and custom types for messaging API.
This commit is contained in:
Thomas Oberndörfer
2014-01-13 13:56:06 +01:00
parent 4f2100fa40
commit 3612fc12dc
25 changed files with 499 additions and 20 deletions

View File

@@ -32,11 +32,13 @@
* User Attribute packet as a User ID packet with opaque contents, but
* an implementation may use any method desired.
* module packet/user_attribute
* @requires enums
* @module packet/user_attribute
*/
var util = require('../util.js'),
packet = require('./packet.js');
packet = require('./packet.js'),
enums = require('../enums.js');
module.exports = UserAttribute;
@@ -44,6 +46,7 @@ module.exports = UserAttribute;
* @constructor
*/
function UserAttribute() {
this.tag = enums.packet.userAttribute;
this.attributes = [];
}