build new docs

This commit is contained in:
Tankred Hase 2014-01-06 16:29:02 +01:00
parent c66d2ba2a2
commit 0d2885d52d
125 changed files with 651 additions and 522 deletions

View File

@ -166,7 +166,7 @@ The code is based on the source code for gunzip.c by Pasi Ojala
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line936">line 936</a>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line931">line 931</a>
</li></ul></dd>
@ -227,7 +227,7 @@ The code is based on the source code for gunzip.c by Pasi Ojala
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line1105">line 1105</a>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line1100">line 1100</a>
</li></ul></dd>
@ -305,7 +305,7 @@ EXAMPLES:
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line1243">line 1243</a>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line1238">line 1238</a>
</li></ul></dd>
@ -491,7 +491,7 @@ EXAMPLES:
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line1202">line 1202</a>
<a href="jxg.js.html">compression/jxg.js</a>, <a href="jxg.js.html#line1197">line 1197</a>
</li></ul></dd>
@ -560,7 +560,7 @@ EXAMPLES:
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -117,7 +117,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -520,8 +520,8 @@ function makeClass(length) {
this.encrypt = function(block) {
return AESencrypt(block, this.key);
}
}
};
};
c.blockSize = c.prototype.blockSize = 16;
c.keySize = c.prototype.keySize = length / 8;
@ -529,7 +529,7 @@ function makeClass(length) {
return c;
}
module.exports = {}
module.exports = {};
var types = [128, 192, 256];
@ -552,7 +552,7 @@ for (var i in types) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -66,12 +66,12 @@ module.exports = {
signature: require('./signature.js'),
/** @see module:packet/trust */
trust: require('./trust.js')
}
};
for (var i in enums.packet) {
var packetClass = module.exports[i];
if (packetClass != undefined)
if (packetClass !== undefined)
packetClass.prototype.tag = enums.packet[i];
}
</code></pre>
@ -90,7 +90,7 @@ for (var i in enums.packet) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1364,7 +1364,7 @@ given base64 encoded checksum
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -240,7 +240,7 @@ function splitHeaders(text) {
var matchResult = reEmptyLine.exec(text);
if (matchResult != null) {
if (matchResult !== null) {
headers = text.slice(0, matchResult.index);
body = text.slice(matchResult.index + matchResult[0].length);
}
@ -262,7 +262,7 @@ function splitChecksum(text) {
var matchResult = reChecksumStart.exec(text);
if (matchResult != null) {
if (matchResult !== null) {
body = text.slice(0, matchResult.index);
checksum = text.slice(matchResult.index + 1);
}
@ -295,14 +295,14 @@ function dearmor(text) {
// so we know the index of the data we are interested in.
var indexBase = 1;
var result, checksum;
var result, checksum, msg;
if (text.search(reSplit) != splittext[0].length) {
indexBase = 0;
}
if (type != 2) {
var msg = splitHeaders(splittext[indexBase]);
msg = splitHeaders(splittext[indexBase]);
var msg_sum = splitChecksum(msg.body);
result = {
@ -313,7 +313,7 @@ function dearmor(text) {
checksum = msg_sum.checksum;
} else {
// Reverse dash-escaping for msg and remove trailing whitespace at end of line
var msg = splitHeaders(splittext[indexBase].replace(/^- /mg, '').replace(/[\t ]+\n/g, "\n"));
msg = splitHeaders(splittext[indexBase].replace(/^- /mg, '').replace(/[\t ]+\n/g, "\n"));
var sig = splitHeaders(splittext[indexBase + 1].replace(/^- /mg, ''));
var sig_sum = splitChecksum(sig.body);
@ -327,10 +327,10 @@ function dearmor(text) {
}
if (!verifyCheckSum(result.data, checksum)) {
throw new Error("Ascii armor integrity check on message failed: '"
+ checksum
+ "' should be '"
+ getCheckSum(result) + "'");
throw new Error("Ascii armor integrity check on message failed: '" +
checksum +
"' should be '" +
getCheckSum(result) + "'");
} else {
return result;
}
@ -419,7 +419,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -393,7 +393,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -59,7 +59,7 @@ function s2r(t) {
for (n = 0; n &lt; tl; n++) {
c = t.charCodeAt(n);
if (s == 0) {
if (s === 0) {
r += b64s.charAt((c >> 2) & 63);
a = (c & 3) &lt;&lt; 4;
} else if (s == 1) {
@ -68,12 +68,12 @@ function s2r(t) {
} else if (s == 2) {
r += b64s.charAt(a | ((c >> 6) & 3));
l += 1;
if ((l % 60) == 0)
if ((l % 60) === 0)
r += "\n";
r += b64s.charAt(c & 63);
}
l += 1;
if ((l % 60) == 0)
if ((l % 60) === 0)
r += "\n";
s += 1;
@ -83,13 +83,13 @@ function s2r(t) {
if (s > 0) {
r += b64s.charAt(a);
l += 1;
if ((l % 60) == 0)
if ((l % 60) === 0)
r += "\n";
r += '=';
l += 1;
}
if (s == 1) {
if ((l % 60) == 0)
if ((l % 60) === 0)
r += "\n";
r += '=';
}
@ -125,7 +125,7 @@ function r2s(t) {
module.exports = {
encode: s2r,
decode: r2s
}
};
</code></pre>
</article>
</section>
@ -142,7 +142,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -111,7 +111,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -41,7 +41,7 @@
* The constructor doesn't do much of anything. It's just here
* so we can start defining properties and methods and such.
*/
function Blowfish() {};
function Blowfish() {}
/*
* Declare the block size so that protocols know what size
@ -434,7 +434,7 @@ function BF(key) {
this.encrypt = function(block) {
return this.bf.encrypt_block(block);
}
};
}
@ -457,7 +457,7 @@ module.exports.blockSize = BF.prototype.blockSize = 16;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -111,7 +111,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -279,19 +279,22 @@ function openpgp_symenc_cast5() {
var t = new Array(8);
var k = new Array(32);
for (var i = 0; i &lt; 4; i++) {
var j = i * 4;
var i, j;
for (i = 0; i &lt; 4; i++) {
j = i * 4;
t[i] = inn[j] &lt;&lt; 24 | inn[j + 1] &lt;&lt; 16 | inn[j + 2] &lt;&lt; 8 | inn[j + 3];
}
var x = [6, 7, 4, 5];
var ki = 0;
var w;
for (var half = 0; half &lt; 2; half++) {
for (var round = 0; round &lt; 4; round++) {
for (var j = 0; j &lt; 4; j++) {
for (j = 0; j &lt; 4; j++) {
var a = scheduleA[round][j];
var w = t[a[1]];
w = t[a[1]];
w ^= sBox[4][(t[a[2] >>> 2] >>> (24 - 8 * (a[2] & 3))) & 0xff];
w ^= sBox[5][(t[a[3] >>> 2] >>> (24 - 8 * (a[3] & 3))) & 0xff];
@ -301,9 +304,9 @@ function openpgp_symenc_cast5() {
t[a[0]] = w;
}
for (var j = 0; j &lt; 4; j++) {
for (j = 0; j &lt; 4; j++) {
var b = scheduleB[round][j];
var w = sBox[4][(t[b[0] >>> 2] >>> (24 - 8 * (b[0] & 3))) & 0xff];
w = sBox[4][(t[b[0] >>> 2] >>> (24 - 8 * (b[0] & 3))) & 0xff];
w ^= sBox[5][(t[b[1] >>> 2] >>> (24 - 8 * (b[1] & 3))) & 0xff];
w ^= sBox[6][(t[b[2] >>> 2] >>> (24 - 8 * (b[2] & 3))) & 0xff];
@ -315,7 +318,7 @@ function openpgp_symenc_cast5() {
}
}
for (var i = 0; i &lt; 16; i++) {
for (i = 0; i &lt; 16; i++) {
this.masking[i] = k[i];
this.rotate[i] = k[16 + i] & 0x1f;
}
@ -614,8 +617,7 @@ function openpgp_symenc_cast5() {
0xe97625a5, 0x0614d1b7, 0x0e25244b, 0x0c768347, 0x589e8d82, 0x0d2059d1, 0xa466bb1e, 0xf8da0a82,
0x04f19130, 0xba6e4ec0, 0x99265164, 0x1ee7230d, 0x50b2ad80, 0xeaee6801, 0x8db2a283, 0xea8bf59e);
};
}
var util = require('../../util');
function cast5(key) {
@ -624,7 +626,7 @@ function cast5(key) {
this.encrypt = function(block) {
return this.cast5.encrypt(block);
}
};
}
module.exports = cast5;
@ -646,7 +648,7 @@ module.exports.keySize = cast5.prototype.keySize = 16;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -768,7 +768,7 @@ This will be passed to the cipherfn</td>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -79,8 +79,9 @@ module.exports = {
prefixrandom = prefixrandom + prefixrandom.charAt(block_size - 2) + prefixrandom.charAt(block_size - 1);
util.print_debug("prefixrandom:" + util.hexstrdump(prefixrandom));
var ciphertext = "";
var i;
// 1. The feedback register (FR) is set to the IV, which is all zeros.
for (var i = 0; i &lt; block_size; i++) FR[i] = 0;
for (i = 0; i &lt; block_size; i++) FR[i] = 0;
// 2. FR is encrypted to produce FRE (FR Encrypted). This is the
// encryption of an all-zero value.
@ -88,13 +89,13 @@ module.exports = {
// 3. FRE is xored with the first BS octets of random data prefixed to
// the plaintext to produce C[1] through C[BS], the first BS octets
// of ciphertext.
for (var i = 0; i &lt; block_size; i++) ciphertext += String.fromCharCode(FRE[i] ^ prefixrandom.charCodeAt(i));
for (i = 0; i &lt; block_size; i++) ciphertext += String.fromCharCode(FRE[i] ^ prefixrandom.charCodeAt(i));
// 4. FR is loaded with C[1] through C[BS].
for (var i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(i);
for (i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(i);
// 5. FR is encrypted to produce FRE, the encryption of the first BS
// octets of ciphertext.
// octets of ciphertext.
FRE = cipherfn.encrypt(FR);
// 6. The left two octets of FRE get xored with the next two octets of
@ -105,22 +106,22 @@ module.exports = {
if (resync) {
// 7. (The resync step) FR is loaded with C3-C10.
for (var i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(i + 2);
for (i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(i + 2);
} else {
for (var i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(i);
for (i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(i);
}
// 8. FR is encrypted to produce FRE.
FRE = cipherfn.encrypt(FR, key);
if (resync) {
// 9. FRE is xored with the first 8 octets of the given plaintext, now
// that we have finished encrypting the 10 octets of prefixed data.
// This produces C11-C18, the next 8 octets of ciphertext.
for (var i = 0; i &lt; block_size; i++)
// that we have finished encrypting the 10 octets of prefixed data.
// This produces C11-C18, the next 8 octets of ciphertext.
for (i = 0; i &lt; block_size; i++)
ciphertext += String.fromCharCode(FRE[i] ^ plaintext.charCodeAt(i));
for (n = block_size + 2; n &lt; plaintext.length; n += block_size) {
// 10. FR is loaded with C11-C18
for (var i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(n + i);
for (i = 0; i &lt; block_size; i++) FR[i] = ciphertext.charCodeAt(n + i);
// 11. FR is encrypted to produce FRE.
FRE = cipherfn.encrypt(FR);
@ -128,20 +129,20 @@ module.exports = {
// 12. FRE is xored with the next 8 octets of plaintext, to produce the
// next 8 octets of ciphertext. These are loaded into FR and the
// process is repeated until the plaintext is used up.
for (var i = 0; i &lt; block_size; i++) ciphertext += String.fromCharCode(FRE[i] ^ plaintext.charCodeAt((n - 2) +
for (i = 0; i &lt; block_size; i++) ciphertext += String.fromCharCode(FRE[i] ^ plaintext.charCodeAt((n - 2) +
i));
}
} else {
plaintext = " " + plaintext;
// 9. FRE is xored with the first 8 octets of the given plaintext, now
// that we have finished encrypting the 10 octets of prefixed data.
// This produces C11-C18, the next 8 octets of ciphertext.
for (var i = 2; i &lt; block_size; i++) ciphertext += String.fromCharCode(FRE[i] ^ plaintext.charCodeAt(i));
// that we have finished encrypting the 10 octets of prefixed data.
// This produces C11-C18, the next 8 octets of ciphertext.
for (i = 2; i &lt; block_size; i++) ciphertext += String.fromCharCode(FRE[i] ^ plaintext.charCodeAt(i));
var tempCiphertext = ciphertext.substring(0, 2 * block_size).split('');
var tempCiphertextString = ciphertext.substring(block_size);
for (n = block_size; n &lt; plaintext.length; n += block_size) {
// 10. FR is loaded with C11-C18
for (var i = 0; i &lt; block_size; i++) FR[i] = tempCiphertextString.charCodeAt(i);
for (i = 0; i &lt; block_size; i++) FR[i] = tempCiphertextString.charCodeAt(i);
tempCiphertextString = '';
// 11. FR is encrypted to produce FRE.
@ -150,13 +151,12 @@ module.exports = {
// 12. FRE is xored with the next 8 octets of plaintext, to produce the
// next 8 octets of ciphertext. These are loaded into FR and the
// process is repeated until the plaintext is used up.
for (var i = 0; i &lt; block_size; i++) {
for (i = 0; i &lt; block_size; i++) {
tempCiphertext.push(String.fromCharCode(FRE[i] ^ plaintext.charCodeAt(n + i)));
tempCiphertextString += String.fromCharCode(FRE[i] ^ plaintext.charCodeAt(n + i));
}
}
ciphertext = tempCiphertext.join('');
}
ciphertext = ciphertext.substring(0, plaintext.length + 2 + block_size);
@ -266,7 +266,7 @@ module.exports = {
}
}
var n = resync ? 0 : 2;
n = resync ? 0 : 2;
text = text.join('');
@ -308,14 +308,15 @@ module.exports = {
var pos = 0;
var plaintext = [];
var offset = 0;
if (iv == null)
for (var i = 0; i &lt; block_size; i++) blockp += String.fromCharCode(0);
var i;
if (iv === null)
for (i = 0; i &lt; block_size; i++) blockp += String.fromCharCode(0);
else
blockp = iv.substring(0, block_size);
while (ciphertext.length > (block_size * pos)) {
var decblock = cipherfn.encrypt(util.str2bin(blockp));
blockp = ciphertext.substring((pos * (block_size)) + offset, (pos * (block_size)) + (block_size) + offset);
for (var i = 0; i &lt; blockp.length; i++) {
for (i = 0; i &lt; blockp.length; i++) {
plaintext.push(String.fromCharCode(blockp.charCodeAt(i) ^ decblock[i]));
}
pos++;
@ -323,7 +324,7 @@ module.exports = {
return plaintext.join('');
}
}
};
</code></pre>
</article>
</section>
@ -340,7 +341,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -412,7 +412,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -151,7 +151,7 @@ CleartextMessage.prototype.armor = function() {
hash: enums.read(enums.hash, config.prefer_hash_algorithm).toUpperCase(),
text: this.text,
data: this.packets.write()
}
};
return armor.encode(enums.armor.signed, body);
};
@ -191,7 +191,7 @@ exports.readArmored = readArmored;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -415,7 +415,7 @@ a Signature or One-Pass Signature packet, and contains a literal data packet.</d
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="compressed.js.html">packet/compressed.js</a>, <a href="compressed.js.html#line144">line 144</a>
<a href="compressed.js.html">packet/compressed.js</a>, <a href="compressed.js.html#line142">line 142</a>
</li></ul></dd>
@ -740,7 +740,7 @@ read by read_packet
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -92,7 +92,7 @@ module.exports = function compressed() {
this.compressed = bytes.substr(1);
this.decompress();
}
};
@ -101,11 +101,11 @@ module.exports = function compressed() {
* @return {String} binary compressed packet
*/
this.write = function() {
if (this.compressed == null)
if (this.compressed === null)
this.compress();
return String.fromCharCode(enums.write(enums.compression, this.algorithm)) + this.compressed;
}
};
/**
@ -113,7 +113,7 @@ module.exports = function compressed() {
* read by read_packet
*/
this.decompress = function() {
var decompressed;
var decompressed, compdata, radix;
switch (this.algorithm) {
case 'uncompressed':
@ -121,9 +121,9 @@ module.exports = function compressed() {
break;
case 'zip':
var compData = this.compressed;
compData = this.compressed;
var radix = base64.encode(compData).replace(/\n/g, "");
radix = base64.encode(compData).replace(/\n/g, "");
// no header in this case, directly call deflate
var jxg_obj = new JXG.Util.Unzip(JXG.Util.Base64.decodeAsArray(radix));
@ -140,8 +140,8 @@ module.exports = function compressed() {
if (compressionMethod == 8) { //CM 8 is for DEFLATE, RFC 1951
// remove 4 bytes ADLER32 checksum from the end
var compData = this.compressed.substring(0, this.compressed.length - 4);
var radix = base64.encode(compData).replace(/\n/g, "");
compData = this.compressed.substring(0, this.compressed.length - 4);
radix = base64.encode(compData).replace(/\n/g, "");
//TODO check ADLER32 checksum
decompressed = JXG.decompress(radix);
break;
@ -155,15 +155,13 @@ module.exports = function compressed() {
case 'bzip2':
// TODO: need to implement this
throw new Error('Compression algorithm BZip2 [BZ2] is not implemented.');
break;
default:
throw new Error("Compression algorithm unknown :" + this.alogrithm);
break;
}
this.packets.read(decompressed);
}
};
/**
* Compress the packet data (member decompressedData)
@ -179,25 +177,21 @@ module.exports = function compressed() {
case 'zip':
// - ZIP [RFC1951]
throw new Error("Compression algorithm ZIP [RFC1951] is not implemented.");
break;
case 'zlib':
// - ZLIB [RFC1950]
// TODO: need to implement this
throw new Error("Compression algorithm ZLIB [RFC1950] is not implemented.");
break;
case 'bzip2':
// - BZip2 [BZ2]
// TODO: need to implement this
throw new Error("Compression algorithm BZip2 [BZ2] is not implemented.");
break;
default:
throw new Error("Compression algorithm unknown :" + this.type);
break;
}
}
};
};
</code></pre>
</article>
@ -215,7 +209,7 @@ module.exports = function compressed() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -331,7 +331,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -88,7 +88,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -197,7 +197,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line220">line 220</a>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line223">line 223</a>
</li></ul></dd>
@ -336,7 +336,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line211">line 211</a>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line214">line 214</a>
</li></ul></dd>
@ -476,7 +476,7 @@ size of the cipher
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line120">line 120</a>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line123">line 123</a>
</li></ul></dd>
@ -687,7 +687,7 @@ of the private key used</td>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line86">line 86</a>
<a href="crypto.js.html">crypto/crypto.js</a>, <a href="crypto.js.html#line87">line 87</a>
</li></ul></dd>
@ -943,7 +943,7 @@ if elgamal encryption an array of two module:type/mpi is returned; otherwise nul
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -69,13 +69,14 @@ module.exports = {
*/
publicKeyEncrypt: function(algo, publicMPIs, data) {
var result = (function() {
var m;
switch (algo) {
case 'rsa_encrypt':
case 'rsa_encrypt_sign':
var rsa = new publicKey.rsa();
var n = publicMPIs[0].toBigInteger();
var e = publicMPIs[1].toBigInteger();
var m = data.toBigInteger();
m = data.toBigInteger();
return [rsa.encrypt(m, e, n)];
case 'elgamal':
@ -83,7 +84,7 @@ module.exports = {
var p = publicMPIs[0].toBigInteger();
var g = publicMPIs[1].toBigInteger();
var y = publicMPIs[2].toBigInteger();
var m = data.toBigInteger();
m = data.toBigInteger();
return elgamal.encrypt(m, g, p, y);
default:
@ -111,6 +112,8 @@ module.exports = {
*/
publicKeyDecrypt: function(algo, keyIntegers, dataIntegers) {
var p;
var bn = (function() {
switch (algo) {
case 'rsa_encrypt_sign':
@ -118,7 +121,7 @@ module.exports = {
var rsa = new publicKey.rsa();
// 0 and 1 are the public key.
var d = keyIntegers[2].toBigInteger();
var p = keyIntegers[3].toBigInteger();
p = keyIntegers[3].toBigInteger();
var q = keyIntegers[4].toBigInteger();
var u = keyIntegers[5].toBigInteger();
var m = dataIntegers[0].toBigInteger();
@ -128,7 +131,7 @@ module.exports = {
var x = keyIntegers[3].toBigInteger();
var c1 = dataIntegers[0].toBigInteger();
var c2 = dataIntegers[1].toBigInteger();
var p = keyIntegers[0].toBigInteger();
p = keyIntegers[0].toBigInteger();
return elgamal.decrypt(c1, c2, p, x);
default:
return null;
@ -264,7 +267,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -215,7 +215,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -108,7 +108,7 @@ function des(keys, message, encrypt, mode, iv, padding) {
//create the 16 or 48 subkeys we will need
var m = 0,
i, j, temp, temp2, right1, right2, left, right, looping;
var cbcleft, cbcleft2, cbcright, cbcright2
var cbcleft, cbcleft2, cbcright, cbcright2;
var endloop, loopinc;
var len = message.length;
var chunk = 0;
@ -405,7 +405,7 @@ function Des(key) {
des(des_createKeys(this.key[0]),
util.bin2str(block), true, 0, null, null),
false, 0, null, null), true, 0, null, null));
}
};
}
Des.keySize = Des.prototype.keySize = 24;
@ -420,12 +420,12 @@ function OriginalDes(key) {
this.encrypt = function(block, padding) {
var keys = des_createKeys(this.key);
return util.str2bin(des(keys, util.bin2str(block), true, 0, null, padding));
}
};
this.decrypt = function(block, padding) {
var keys = des_createKeys(this.key);
return util.str2bin(des(keys, util.bin2str(block), false, 0, null, padding));
}
};
}
module.exports = {
@ -433,7 +433,7 @@ module.exports = {
des: Des,
/** @static */
originalDes: OriginalDes
}
};
</code></pre>
</article>
</section>
@ -450,7 +450,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -123,7 +123,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -72,7 +72,7 @@ function DSA() {
var k = random.getRandomBigIntegerInRange(BigInteger.ONE.add(BigInteger.ONE), q.subtract(BigInteger.ONE));
var s1 = (g.modPow(k, p)).mod(q);
var s2 = (k.modInverse(q).multiply(hash.add(x.multiply(s1)))).mod(q);
var result = new Array();
var result = [];
result[0] = s1.toMPI();
result[1] = s2.toMPI();
return result;
@ -135,61 +135,61 @@ function DSA() {
* unused code. This can be used as a start to write a key generator
* function.
function generateKey(bitcount) {
var qi = new BigInteger(bitcount, primeCenterie);
var pi = generateP(q, 512);
var gi = generateG(p, q, bitcount);
var xi;
do {
xi = new BigInteger(q.bitCount(), rand);
} while (x.compareTo(BigInteger.ZERO) != 1 && x.compareTo(q) != -1);
var yi = g.modPow(x, p);
return {x: xi, q: qi, p: pi, g: gi, y: yi};
}
function generateKey(bitcount) {
var qi = new BigInteger(bitcount, primeCenterie);
var pi = generateP(q, 512);
var gi = generateG(p, q, bitcount);
var xi;
do {
xi = new BigInteger(q.bitCount(), rand);
} while (x.compareTo(BigInteger.ZERO) != 1 && x.compareTo(q) != -1);
var yi = g.modPow(x, p);
return {x: xi, q: qi, p: pi, g: gi, y: yi};
}
function generateP(q, bitlength, randomfn) {
if (bitlength % 64 != 0) {
return false;
}
var pTemp;
var pTemp2;
do {
pTemp = randomfn(bitcount, true);
pTemp2 = pTemp.subtract(BigInteger.ONE);
pTemp = pTemp.subtract(pTemp2.remainder(q));
} while (!pTemp.isProbablePrime(primeCenterie) || pTemp.bitLength() != l);
return pTemp;
}
function generateP(q, bitlength, randomfn) {
if (bitlength % 64 != 0) {
return false;
}
var pTemp;
var pTemp2;
do {
pTemp = randomfn(bitcount, true);
pTemp2 = pTemp.subtract(BigInteger.ONE);
pTemp = pTemp.subtract(pTemp2.remainder(q));
} while (!pTemp.isProbablePrime(primeCenterie) || pTemp.bitLength() != l);
return pTemp;
}
function generateG(p, q, bitlength, randomfn) {
var aux = p.subtract(BigInteger.ONE);
var pow = aux.divide(q);
var gTemp;
do {
gTemp = randomfn(bitlength);
} while (gTemp.compareTo(aux) != -1 && gTemp.compareTo(BigInteger.ONE) != 1);
return gTemp.modPow(pow, p);
}
function generateG(p, q, bitlength, randomfn) {
var aux = p.subtract(BigInteger.ONE);
var pow = aux.divide(q);
var gTemp;
do {
gTemp = randomfn(bitlength);
} while (gTemp.compareTo(aux) != -1 && gTemp.compareTo(BigInteger.ONE) != 1);
return gTemp.modPow(pow, p);
}
function generateK(q, bitlength, randomfn) {
var tempK;
do {
tempK = randomfn(bitlength, false);
} while (tempK.compareTo(q) != -1 && tempK.compareTo(BigInteger.ZERO) != 1);
return tempK;
}
function generateK(q, bitlength, randomfn) {
var tempK;
do {
tempK = randomfn(bitlength, false);
} while (tempK.compareTo(q) != -1 && tempK.compareTo(BigInteger.ZERO) != 1);
return tempK;
}
function generateR(q,p) {
k = generateK(q);
var r = g.modPow(k, p).mod(q);
return r;
}
function generateR(q,p) {
k = generateK(q);
var r = g.modPow(k, p).mod(q);
return r;
}
function generateS(hashfn,k,r,m,q,x) {
var hash = hashfn(m);
s = (k.modInverse(q).multiply(hash.add(x.multiply(r)))).mod(q);
return s;
} */
function generateS(hashfn,k,r,m,q,x) {
var hash = hashfn(m);
s = (k.modInverse(q).multiply(hash.add(x.multiply(r)))).mod(q);
return s;
} */
this.sign = sign;
this.verify = verify;
// this.generate = generateKey;
@ -212,7 +212,7 @@ module.exports = DSA;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -121,7 +121,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -101,7 +101,7 @@ module.exports = Elgamal;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -341,7 +341,7 @@ module.exports = {
throw new Error('Invalid enum value.');
}
}
};
</code></pre>
</article>
</section>
@ -358,7 +358,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -825,7 +825,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -41,45 +41,37 @@
<section>
<article><p>[<img alt="Build Status" src="https://secure.travis-ci.org/openpgpjs/openpgpjs.png?branch=master,devel)](http://travis-ci.org/openpgpjs/openpgpjs"/></p>
<h1>What is OpenPGP.js?</h1>
<article><h1>OpenPGP.js <a href="http://travis-ci.org/openpgpjs/openpgpjs"><img src="https://secure.travis-ci.org/openpgpjs/openpgpjs.png?branch=master,v0.1.x" alt="Build Status"></a></h1>
<p><a href="http://openpgpjs.org/">OpenPGP.js</a> is a Javascript implementation of the OpenPGP protocol. This is defined in <a href="http://tools.ietf.org/html/rfc4880">RFC 4880</a>.</p>
<h1>How do I use it?</h1>
<p>As a developer, the best place to start is in the <code>resources/</code> directory. Within this you will find a basic example implementation and the &quot;binary&quot; files for this library. It is likely that you will want to use <code>resources/openpgp.min.js</code> on your site, this is a minified version of our library.</p>
<p>You can download a prebuilt minified version of the library under <a href="https://github.com/openpgpjs/openpgpjs/releases">releases</a>.</p>
<p>You can also build a current version yourself:</p>
<pre><code>npm install &amp;&amp; grunt</code></pre>
<p>Then take the resulting file from <code>resources/openpgp.min.js</code> to use in your project.</p>
<h1>I need some help</h1>
<h2>Mailing List</h2>
<p>You can <a href="http://list.openpgpjs.org/">sign up</a> for our mailing list and ask for help there. We&#39;ve recently worked on getting our <a href="http://www.mail-archive.com/list@openpgpjs.org/">archive up and running</a>.</p>
<p>You can <a href="http://list.openpgpjs.org/">sign up</a> for our mailing list and ask for help there. We've recently worked on getting our <a href="http://www.mail-archive.com/list@openpgpjs.org/">archive up and running</a>.</p>
<h2>Documentation</h2>
<p>A jsdoc build of our code comments is available at <a href="doc/index.html">doc/index.html</a>. Public calls should generally be made through the OpenPGP object <a href="doc/openpgp.html">doc/openpgp.html</a>.</p>
<h1>How do I get involved?</h1>
<p>You want to help, great! Go ahead and fork our repo, make your changes and make a pull request. Please be sure that you run <code>make minify</code> from the root directory to concatenate and minify the library into the <code>resources/</code> directory.</p>
<p>You want to help, great! Go ahead and fork our repo, make your changes
and make a pull request.</p>
<p>It is extra awesome if you write tests for the code you change. Our test coverage is relatively weak, so if you can add cases that is great.</p>
<h1>What License do you use?</h1>
<p>GNU Lesser General Public License (2.1). Please take a look at the <a href="LICENSE">LICENSE</a> file for more information.</p>
<h1>What are the requirements to use it?</h1>
<p>OpenPGP.js currently only fully supports Chrome. Firefox support should be coming soon with the advent of Firefox 23 with native javascript support for <code>window.crypto.getRandomValues</code>. If you can help us support more browsers and situations, please chip in!</p>
<h1>Resources</h1>
<p>Below is a collection of resources, many of these were projects that were in someway a precursor to the current OpenPGP.js project. If you&#39;d like to add your link here, please do so in a pull request or email to the list.</p>
<ul><li><a href="http://www.hanewin.net/encrypt/">http://www.hanewin.net/encrypt/</a></li><li><a href="https://github.com/seancolyer/gmail-crypt">https://github.com/seancolyer/gmail-crypt</a></li><li><a href="https://github.com/mete0r/openpgp-js">https://github.com/mete0r/openpgp-js</a></li><li><a href="http://fitblip.github.com/JSPGP-Stuffs/">http://fitblip.github.com/JSPGP-Stuffs/</a></li><li><a href="http://qooxdoo.org/contrib/project/crypto">http://qooxdoo.org/contrib/project/crypto</a></li><li><a href="https://github.com/GPGTools/Mobile/wiki/Introduction">https://github.com/GPGTools/Mobile/wiki/Introduction</a></li><li><a href="http://gpg4browsers.recurity.com/">http://gpg4browsers.recurity.com/</a></li></ul></article>
<p>Below is a collection of resources, many of these were projects that were in someway a precursor to the current OpenPGP.js project. If you'd like to add your link here, please do so in a pull request or email to the list.</p>
<ul>
<li><a href="http://www.hanewin.net/encrypt/"><a href="http://www.hanewin.net/encrypt/">http://www.hanewin.net/encrypt/</a></a></li>
<li><a href="https://github.com/seancolyer/gmail-crypt"><a href="https://github.com/seancolyer/gmail-crypt">https://github.com/seancolyer/gmail-crypt</a></a></li>
<li><a href="https://github.com/mete0r/openpgp-js"><a href="https://github.com/mete0r/openpgp-js">https://github.com/mete0r/openpgp-js</a></a></li>
<li><a href="http://fitblip.github.com/JSPGP-Stuffs/"><a href="http://fitblip.github.com/JSPGP-Stuffs/">http://fitblip.github.com/JSPGP-Stuffs/</a></a></li>
<li><a href="http://qooxdoo.org/contrib/project/crypto"><a href="http://qooxdoo.org/contrib/project/crypto">http://qooxdoo.org/contrib/project/crypto</a></a></li>
<li><a href="https://github.com/GPGTools/Mobile/wiki/Introduction"><a href="https://github.com/GPGTools/Mobile/wiki/Introduction">https://github.com/GPGTools/Mobile/wiki/Introduction</a></a></li>
<li><a href="http://gpg4browsers.recurity.com/"><a href="http://gpg4browsers.recurity.com/">http://gpg4browsers.recurity.com/</a></a></li>
</ul></article>
</section>
@ -181,7 +173,7 @@ for extending and developing on top of the base library.</div>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -80,7 +80,7 @@ module.exports.crypto = require('./crypto');
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -44,8 +44,7 @@ module.exports = {
random: require('./random.js'),
/** @see module:crypto/pkcs1 */
pkcs1: require('./pkcs1.js')
}
};
var crypto = require('./crypto.js');
@ -67,7 +66,7 @@ for (var i in crypto)
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -37,16 +37,16 @@ var desModule = require('./des.js');
module.exports = {
/** @see module:crypto/cipher/des.des */
des: desModule['des'],
des: desModule.des,
/** @see module:crypto/cipher/des.originalDes */
originalDes: desModule['originalDes'],
originalDes: desModule.originalDes,
/** @see module:crypto/cipher/cast5 */
cast5: require('./cast5.js'),
/** @see module:crypto/cipher/twofish */
twofish: require('./twofish.js'),
/** @see module:crypto/cipher/blowfish */
blowfish: require('./blowfish.js')
}
};
var aes = require('./aes.js');
@ -69,7 +69,7 @@ for (var i in aes) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -101,7 +101,7 @@ module.exports = {
return 32;
case 9:
// - SHA384 [FIPS180]
return 48
return 48;
case 10:
// - SHA512 [FIPS180]
return 64;
@ -112,7 +112,7 @@ module.exports = {
throw new Error('Invalid hash algorithm.');
}
}
}
};
</code></pre>
</article>
</section>
@ -129,7 +129,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -38,7 +38,7 @@ module.exports = {
elgamal: require('./elgamal.js'),
/** @see module:crypto/public_key/dsa */
dsa: require('./dsa.js')
}
};
</code></pre>
</article>
</section>
@ -55,7 +55,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -117,7 +117,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1751,7 +1751,7 @@ BigInteger.prototype.square = bnSquare;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -29,7 +29,7 @@
exists: (function(undefined) {
return function(v) {
return !(v === undefined || v === null);
}
};
})()
};
JXG.decompress = function(str) {
@ -169,24 +169,24 @@ JXG.Util.Unzip = function(barray) {
return bA[bytepos++];
} else
return -1;
};
}
function byteAlign() {
bb = 1;
};
}
function readBit() {
var carry;
bits++;
carry = (bb & 1);
bb >>= 1;
if (bb == 0) {
if (bb === 0) {
bb = readByte();
carry = (bb & 1);
bb = (bb >> 1) | 0x80;
}
return carry;
};
}
function readBits(a) {
var res = 0,
@ -199,12 +199,12 @@ JXG.Util.Unzip = function(barray) {
res = bitReverse[res] >> (8 - a);
}
return res;
};
}
function flushBuffer() {
//document.write('FLUSHBUFFER:'+buf32k);
bIdx = 0;
};
}
function addBuffer(a) {
SIZE++;
@ -216,14 +216,14 @@ JXG.Util.Unzip = function(barray) {
//document.write('ADDBUFFER:'+buf32k);
bIdx = 0;
}
};
}
function HufNode() {
this.b0 = 0;
this.b1 = 0;
this.jump = null;
this.jumppos = -1;
};
}
var LITERALS = 288;
@ -250,7 +250,7 @@ JXG.Util.Unzip = function(barray) {
return fpos[len]++;
fpos[len]++;
}
};
}
function Rec() {
var curplace = Places[treepos];
@ -296,7 +296,7 @@ JXG.Util.Unzip = function(barray) {
}
len--;
return 0;
};
}
function CreateTree(currentTree, numval, lengths, show) {
var i;
@ -341,7 +341,7 @@ JXG.Util.Unzip = function(barray) {
}
}*/
return 0;
};
}
function DecodeValue(currentTree) {
var len, i,
@ -380,10 +380,10 @@ JXG.Util.Unzip = function(barray) {
X = currentTree[xtreepos];
}
}
};
}
function DeflateLoop() {
var last, c, type, i, len;
var last, c, type, i, j, len, dist;
do {
/*if((last = readBit())){
@ -416,7 +416,7 @@ JXG.Util.Unzip = function(barray) {
break;
}
if (type == 0) {
if (type === 0) {
var blockLen, cSum;
// Stored
@ -435,8 +435,6 @@ JXG.Util.Unzip = function(barray) {
addBuffer(c);
}
} else if (type == 1) {
var j;
/* Fixed Huffman tables -- fixed decode routine */
while (1) {
/*
@ -481,8 +479,6 @@ JXG.Util.Unzip = function(barray) {
/* EOF */
break;
} else {
var len, dist;
j -= 256 + 1; /* bytes + EOF */
len = readBits(cplext[j]) + cplens[j];
@ -497,13 +493,13 @@ JXG.Util.Unzip = function(barray) {
/*fprintf(errfp, "@%d (l%02x,d%04x)\n", SIZE, len, dist);*/
for (j = 0; j &lt; len; j++) {
var c = buf32k[(bIdx - dist) & 0x7fff];
c = buf32k[(bIdx - dist) & 0x7fff];
addBuffer(c);
}
}
} // while
} else if (type == 2) {
var j, n, literalCodes, distCodes, lenCodes;
var n, literalCodes, distCodes, lenCodes;
var ll = new Array(288 + 32); // "static" just to preserve stack
// Dynamic Huffman tables
@ -538,8 +534,8 @@ JXG.Util.Unzip = function(barray) {
document.write("&lt;br>" + distanceTree[a].b0 + " " + distanceTree[a].b1 + " " + distanceTree[a].jump + " " +
distanceTree[a].jumppos);
/*if (distanceTree[a].jumppos!=-1)
document.write(" "+distanceTree[a].jump.b0+" "+distanceTree[a].jump.b1);
*/
document.write(" "+distanceTree[a].jump.b0+" "+distanceTree[a].jump.b1);
*/
}
}
//document.write('&lt;BR>tree created');
@ -600,7 +596,7 @@ JXG.Util.Unzip = function(barray) {
len = literalTree.length;
for (i = 0; i &lt; len; i++)
distanceTree[i] = new HufNode();
var ll2 = new Array();
var ll2 = [];
for (i = literalCodes; i &lt; ll.length; i++) {
ll2[i - literalCodes] = ll[i];
}
@ -613,9 +609,8 @@ JXG.Util.Unzip = function(barray) {
outer: while (1) {
j = DecodeValue(literalTree);
if (j >= 256) { // In C64: if carry set
var len, dist;
j -= 256;
if (j == 0) {
if (j === 0) {
// EOF
break;
}
@ -634,7 +629,7 @@ JXG.Util.Unzip = function(barray) {
if (bIdx - dist &lt; 0) {
break outer;
}
var c = buf32k[(bIdx - dist) & 0x7fff];
c = buf32k[(bIdx - dist) & 0x7fff];
addBuffer(c);
}
} else {
@ -647,7 +642,7 @@ JXG.Util.Unzip = function(barray) {
byteAlign();
return 0;
};
}
JXG.Util.Unzip.prototype.unzipFile = function(name) {
var i;
@ -658,7 +653,6 @@ JXG.Util.Unzip = function(barray) {
return unzipped[i][0];
}
}
};
JXG.Util.Unzip.prototype.deflate = function() {
@ -673,7 +667,7 @@ JXG.Util.Unzip = function(barray) {
unzipped[files][1] = "DEFLATE";
files++;
return unzipped;
}
};
JXG.Util.Unzip.prototype.unzip = function() {
//convertToByteArray(input);
@ -798,8 +792,9 @@ JXG.Util.Unzip = function(barray) {
alert("filelen " + filelen);
i = 0;
nameBuf = [];
var c;
while (filelen--) {
var c = readByte();
c = readByte();
if (c == "/" | c == ":") {
i = 0;
} else if (i &lt; NAMEMAX - 1)
@ -821,7 +816,7 @@ JXG.Util.Unzip = function(barray) {
CRC = 0xffffffff;
SIZE = 0;
if (size == 0 && fileOut.charAt(fileout.length - 1) == "/") {
if (size === 0 && fileOut.charAt(fileout.length - 1) == "/") {
//skipdir
if (debug)
alert("skipdir");
@ -839,7 +834,7 @@ JXG.Util.Unzip = function(barray) {
skipdir();
}
}
};
}
function skipdir() {
var crc,
@ -952,7 +947,7 @@ JXG.Util.Unzip = function(barray) {
if (modeZIP)
nextFile();
};
}
};
@ -1096,7 +1091,7 @@ JXG.Util.Base64 = {
lineno, i,
destripped = [];
if (wrap == null)
if (wrap === null)
wrap = 76;
stripped.replace(/ /g, "");
@ -1251,7 +1246,7 @@ JXG.Util.utf8Decode = function(utftext) {
string.push(String.fromCharCode(((c & 15) &lt;&lt; 12) | ((c2 & 63) &lt;&lt; 6) | (c3 & 63)));
i += 3;
}
};
}
return string.join('');
};
@ -1308,7 +1303,7 @@ module.exports = JXG;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -155,11 +155,12 @@ Key.prototype.toPacketlist = function() {
packetlist.push(this.primaryKey);
packetlist.push(this.revocationSignature);
packetlist.concat(this.directSignatures);
for (var i = 0; i &lt; this.users.length; i++) {
var i;
for (i = 0; i &lt; this.users.length; i++) {
packetlist.concat(this.users[i].toPacketlist());
}
if (this.subKeys) {
for (var i = 0; i &lt; this.subKeys.length; i++) {
for (i = 0; i &lt; this.subKeys.length; i++) {
packetlist.concat(this.subKeys[i].toPacketlist());
}
}
@ -284,16 +285,17 @@ Key.prototype.isPrivate = function() {
Key.prototype.toPublic = function() {
var packetlist = new packet.list();
var keyPackets = this.toPacketlist();
var bytes;
for (var i = 0; i &lt; keyPackets.length; i++) {
switch (keyPackets[i].tag) {
case enums.packet.secret_key:
var bytes = keyPackets[i].writePublicKey();
bytes = keyPackets[i].writePublicKey();
var pubKeyPacket = new packet.public_key();
pubKeyPacket.read(bytes);
packetlist.push(pubKeyPacket);
break;
case enums.packet.secret_subkey:
var bytes = keyPackets[i].writePublicKey();
bytes = keyPackets[i].writePublicKey();
var pubSubkeyPacket = new packet.public_subkey();
pubSubkeyPacket.read(bytes);
packetlist.push(pubSubkeyPacket);
@ -355,7 +357,7 @@ function isValidEncryptionKeyPacket(keyPacket, signature) {
((signature.keyFlags & enums.keyFlags.encrypt_communication) !== 0 ||
(signature.keyFlags & enums.keyFlags.encrypt_storage) !== 0 ||
!signature.keyFlags);
};
}
function isValidSigningKeyPacket(keyPacket, signature) {
return (keyPacket.algorithm == enums.read(enums.publicKey, enums.publicKey.dsa) ||
@ -363,7 +365,7 @@ function isValidSigningKeyPacket(keyPacket, signature) {
keyPacket.algorithm == enums.read(enums.publicKey, enums.publicKey.rsa_encrypt_sign)) &&
((signature.keyFlags & enums.keyFlags.sign_data) !== 0 ||
!signature.keyFlags);
};
}
/**
* Returns the first valid encryption key packet for this key
@ -496,7 +498,7 @@ Key.prototype.getPrimaryUser = function() {
}
}
return user ? {user: user, selfCertificate: userSelfCert} : null;
}
};
// TODO
Key.prototype.revoke = function() {
@ -512,7 +514,7 @@ function User(userPacket) {
return new User(userPacket);
}
this.userId = userPacket.tag == enums.packet.userid ? userPacket : null;
this.userAttribute = userPacket.tag == enums.packet.user_attribute ? userPacket : null
this.userAttribute = userPacket.tag == enums.packet.user_attribute ? userPacket : null;
this.selfCertifications = null;
this.otherCertifications = null;
this.revocationCertifications = null;
@ -710,8 +712,8 @@ function readArmored(armoredText) {
var packetlist = new packet.list();
packetlist.read(input.data);
var keyIndex = packetlist.indexOfTag(enums.packet.public_key, enums.packet.secret_key);
if (keyIndex.length == 0) {
throw new Error('No key packet found in armored text')
if (keyIndex.length === 0) {
throw new Error('No key packet found in armored text');
}
for (var i = 0; i &lt; keyIndex.length; i++) {
var oneKeyList = packetlist.slice(keyIndex[i], keyIndex[i + 1]);
@ -807,7 +809,7 @@ exports.generate = generate;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -311,7 +311,7 @@ formed.</div>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:44 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:55 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -90,7 +90,7 @@ module.exports = function keyid() {
module.exports.mapToHex = function(keyId) {
return keyId.toHex();
}
};
</code></pre>
</article>
</section>
@ -107,7 +107,7 @@ module.exports.mapToHex = function(keyId) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -2041,7 +2041,7 @@ keyring from HTML5 local storage and initializes this instance.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:52 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -231,7 +231,7 @@ module.exports = function(storeHandler) {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -966,7 +966,7 @@ will be normalized to \r\n and by default text is converted to UTF8
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -74,7 +74,7 @@ module.exports = function literal() {
text = text.replace(/\r/g, '').replace(/\n/g, '\r\n');
// encode UTF8
this.data = this.format == 'utf8' ? util.encode_utf8(text) : text;
}
};
/**
* Returns literal data packets as native JavaScript string
@ -86,7 +86,7 @@ module.exports = function literal() {
var text = util.decode_utf8(this.data);
// normalize EOL to \n
return text.replace(/\r\n/g, '\n');
}
};
/**
* Set the packet data to value represented by the provided string of bytes.
@ -96,7 +96,7 @@ module.exports = function literal() {
this.setBytes = function (bytes, format) {
this.format = format;
this.data = bytes;
}
};
/**
@ -105,7 +105,7 @@ module.exports = function literal() {
*/
this.getBytes = function () {
return this.data;
}
};
/**
@ -132,7 +132,7 @@ module.exports = function literal() {
var data = bytes.substring(6 + filename_len);
this.setBytes(data, format);
}
};
/**
* Creates a string representation of the packet
@ -152,8 +152,8 @@ module.exports = function literal() {
result += util.writeDate(this.date);
result += data;
return result;
}
}
};
};
</code></pre>
</article>
</section>
@ -170,7 +170,7 @@ module.exports = function literal() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -323,7 +323,7 @@ if config is null the default config will be used
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -47,15 +47,15 @@ module.exports = function localStorage() {
this.write();
} else
this.config = cf;
}
};
/**
* Writes the config to HTML5 local storage
*/
this.write = function () {
window.localStorage.setItem("config", JSON.stringify(this.config));
}
}
};
};
</code></pre>
</article>
</section>
@ -72,7 +72,7 @@ module.exports = function localStorage() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -332,7 +332,7 @@ The privateKeys array and publicKeys array gets Stringified using JSON
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:52 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -66,7 +66,7 @@ module.exports = function () {
}
}
return keys;
}
};
/**
* Saves the current state of the keyring to HTML5 local storage.
@ -79,7 +79,7 @@ module.exports = function () {
armoredKeys.push(keys[i].armor());
}
window.localStorage.setItem("armoredKeys", JSON.stringify(armoredKeys));
}
};
};
</code></pre>
</article>
@ -97,7 +97,7 @@ module.exports = function () {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -376,7 +376,7 @@ Such a packet MUST be ignored when received.</div>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -77,8 +77,8 @@ module.exports = function marker() {
return true;
// marker packet does not contain "PGP"
return false;
}
}
};
};
</code></pre>
</article>
</section>
@ -95,7 +95,7 @@ module.exports = function marker() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -235,7 +235,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -54,7 +54,7 @@ module.exports = function (entree) {
var hex = md5(entree);
var bin = util.hex2bin(hex);
return bin;
}
};
function md5cycle(x, k) {
var a = x[0],
@ -258,7 +258,7 @@ if (md5('hello') != '5d41402abc4b2a76b9719d911017c592') {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -211,10 +211,10 @@ Message.prototype.sign = function(privateKeys) {
if (!literalDataPacket) throw new Error('No literal data packet to sign.');
var literalFormat = enums.write(enums.literal, literalDataPacket.format);
var signatureType = literalFormat == enums.literal.binary
? enums.signature.binary : enums.signature.text;
for (var i = 0; i &lt; privateKeys.length; i++) {
var signatureType = literalFormat == enums.literal.binary ?
enums.signature.binary : enums.signature.text;
var i;
for (i = 0; i &lt; privateKeys.length; i++) {
var onePassSig = new packet.one_pass_signature();
onePassSig.type = signatureType;
//TODO get preferred hashg algo from key signature
@ -230,7 +230,7 @@ Message.prototype.sign = function(privateKeys) {
packetlist.push(literalDataPacket);
for (var i = privateKeys.length - 1; i >= 0; i--) {
for (i = privateKeys.length - 1; i >= 0; i--) {
var signaturePacket = new packet.signature();
signaturePacket.signatureType = signatureType;
signaturePacket.hashAlgorithm = config.prefer_hash_algorithm;
@ -357,7 +357,7 @@ exports.fromBinary = fromBinary;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -747,7 +747,7 @@ See http://tools.ietf.org/html/rfc4880#section-7</div>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -273,7 +273,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -521,7 +521,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:40 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:50 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -4533,7 +4533,7 @@ document) that cannot include a target subpacket.</td>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -216,7 +216,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line285">line 285</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line287">line 287</a>
</li></ul></dd>
@ -355,7 +355,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line369">line 369</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line371">line 371</a>
</li></ul></dd>
@ -517,7 +517,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line388">line 388</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line390">line 390</a>
</li></ul></dd>
@ -608,7 +608,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line168">line 168</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line169">line 169</a>
</li></ul></dd>
@ -695,7 +695,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line345">line 345</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line347">line 347</a>
</li></ul></dd>
@ -798,7 +798,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line176">line 176</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line177">line 177</a>
</li></ul></dd>
@ -885,7 +885,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line146">line 146</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line147">line 147</a>
</li></ul></dd>
@ -978,7 +978,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line317">line 317</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line319">line 319</a>
</li></ul></dd>
@ -1067,7 +1067,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line453">line 453</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line455">line 455</a>
</li></ul></dd>
@ -1206,7 +1206,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line215">line 215</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line216">line 216</a>
</li></ul></dd>
@ -1347,7 +1347,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line202">line 202</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line203">line 203</a>
</li></ul></dd>
@ -1440,7 +1440,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line294">line 294</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line296">line 296</a>
</li></ul></dd>
@ -1537,7 +1537,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line154">line 154</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line155">line 155</a>
</li></ul></dd>
@ -1624,7 +1624,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line227">line 227</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line228">line 228</a>
</li></ul></dd>
@ -1715,7 +1715,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line249">line 249</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line250">line 250</a>
</li></ul></dd>
@ -1802,7 +1802,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line241">line 241</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line242">line 242</a>
</li></ul></dd>
@ -2097,7 +2097,7 @@ Can contain additional subkeys, signatures, user ids, user attributes.</div>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line257">line 257</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line258">line 258</a>
</li></ul></dd>
@ -2189,7 +2189,7 @@ and valid self signature
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line411">line 411</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line413">line 413</a>
</li></ul></dd>
@ -2258,7 +2258,7 @@ and valid self signature
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:52 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -80,7 +80,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line591">line 591</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line593">line 593</a>
</li></ul></dd>
@ -218,7 +218,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line617">line 617</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line619">line 619</a>
</li></ul></dd>
@ -356,7 +356,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line627">line 627</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line629">line 629</a>
</li></ul></dd>
@ -443,7 +443,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line604">line 604</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line606">line 606</a>
</li></ul></dd>
@ -531,7 +531,7 @@ and valid binding signature
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line637">line 637</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line639">line 639</a>
</li></ul></dd>
@ -600,7 +600,7 @@ and valid binding signature
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:52 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -80,7 +80,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line483">line 483</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line485">line 485</a>
</li></ul></dd>
@ -218,7 +218,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line532">line 532</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line534">line 534</a>
</li></ul></dd>
@ -383,7 +383,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line513">line 513</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line515">line 515</a>
</li></ul></dd>
@ -474,7 +474,7 @@
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line498">line 498</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line500">line 500</a>
</li></ul></dd>
@ -613,7 +613,7 @@ and validity of self signature
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line562">line 562</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line564">line 564</a>
</li></ul></dd>
@ -682,7 +682,7 @@ and validity of self signature
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -281,7 +281,7 @@ Primary and subkey will be of same type.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line717">line 717</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line719">line 719</a>
</li></ul></dd>
@ -416,7 +416,7 @@ Primary and subkey will be of same type.
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line675">line 675</a>
<a href="key.js.html">key.js</a>, <a href="key.js.html#line677">line 677</a>
</li></ul></dd>
@ -485,7 +485,7 @@ Primary and subkey will be of same type.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:52 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:42 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:52 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1303,7 +1303,7 @@ See http://tools.ietf.org/html/rfc4880#section-11.3</td>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -553,7 +553,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1364,7 +1364,7 @@ Primary and subkey will be of same type.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1033,7 +1033,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:44 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:55 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:45 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:55 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -486,7 +486,7 @@ actual integer.</div>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:45 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:55 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -84,11 +84,11 @@ module.exports = function mpi() {
// The size of an MPI is ((MPI.length + 7) / 8) + 2 octets.
//
// The length field of an MPI describes the length starting from its
// most significant non-zero bit. Thus, the MPI [00 02 01] is not
// most significant non-zero bit. Thus, the MPI [00 02 01] is not
// formed correctly. It should be [00 01 01].
// TODO: Verification of this size method! This size calculation as
// specified above is not applicable in JavaScript
// specified above is not applicable in JavaScript
var bytelen = Math.ceil(bits / 8);
var raw = bytes.substr(2, bytelen);
@ -124,7 +124,7 @@ module.exports = function mpi() {
this.fromBigInteger = function (bn) {
this.data = bn.clone();
};
}
};
</code></pre>
</article>
</section>
@ -141,7 +141,7 @@ module.exports = function mpi() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -428,7 +428,7 @@ can compute the entire signed message in one pass.</div>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -101,7 +101,7 @@ module.exports = function one_pass_signature() {
// signature to be applied to the same message data.
this.flags = bytes.charCodeAt(mypos++);
return this;
}
};
/**
* creates a string representation of a one-pass signature packet
@ -118,7 +118,7 @@ module.exports = function one_pass_signature() {
result += String.fromCharCode(this.flags);
return result;
}
};
};
</code></pre>
</article>
@ -136,7 +136,7 @@ module.exports = function one_pass_signature() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -185,7 +185,7 @@ function generateKeyPair(keyType, numBits, userId, passphrase) {
exports.encryptMessage = encryptMessage;
exports.signAndEncryptMessage = signAndEncryptMessage;
exports.decryptMessage = decryptMessage;
exports.decryptAndVerifyMessage = decryptAndVerifyMessage
exports.decryptAndVerifyMessage = decryptAndVerifyMessage;
exports.signClearMessage = signClearMessage;
exports.verifyClearSignedMessage = verifyClearSignedMessage;
exports.generateKeyPair = generateKeyPair;
@ -205,7 +205,7 @@ exports.generateKeyPair = generateKeyPair;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -774,7 +774,7 @@ string
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -150,8 +150,8 @@ module.exports = {
*/
read: function(input, position, len) {
// some sanity checks
if (input == null || input.length &lt;= position || input.substring(position).length &lt; 2 || (input.charCodeAt(position) &
0x80) == 0) {
if (input === null || input.length &lt;= position || input.substring(position).length &lt; 2 || (input.charCodeAt(position) &
0x80) === 0) {
throw new Error("Error during parsing. This message / key is probably not containing a valid OpenPGP format.");
}
var mypos = position;
@ -160,7 +160,7 @@ module.exports = {
var packet_length;
format = 0; // 0 = old format; 1 = new format
if ((input.charCodeAt(mypos) & 0x40) != 0) {
if ((input.charCodeAt(mypos) & 0x40) !== 0) {
format = 1;
}
@ -234,27 +234,28 @@ module.exports = {
// EEEK, we're reading the full data here...
var mypos2 = mypos + packet_length;
bodydata = input.substring(mypos, mypos + packet_length);
var tmplen;
while (true) {
if (input.charCodeAt(mypos2) &lt; 192) {
var tmplen = input.charCodeAt(mypos2++);
tmplen = input.charCodeAt(mypos2++);
packet_length += tmplen;
bodydata += input.substring(mypos2, mypos2 + tmplen);
mypos2 += tmplen;
break;
} else if (input.charCodeAt(mypos2) >= 192 && input.charCodeAt(mypos2) &lt; 224) {
var tmplen = ((input.charCodeAt(mypos2++) - 192) &lt;&lt; 8) + (input.charCodeAt(mypos2++)) + 192;
tmplen = ((input.charCodeAt(mypos2++) - 192) &lt;&lt; 8) + (input.charCodeAt(mypos2++)) + 192;
packet_length += tmplen;
bodydata += input.substring(mypos2, mypos2 + tmplen);
mypos2 += tmplen;
break;
} else if (input.charCodeAt(mypos2) > 223 && input.charCodeAt(mypos2) &lt; 255) {
var tmplen = 1 &lt;&lt; (input.charCodeAt(mypos2++) & 0x1F);
tmplen = 1 &lt;&lt; (input.charCodeAt(mypos2++) & 0x1F);
packet_length += tmplen;
bodydata += input.substring(mypos2, mypos2 + tmplen);
mypos2 += tmplen;
} else {
mypos2++;
var tmplen = (input.charCodeAt(mypos2++) &lt;&lt; 24) | (input.charCodeAt(mypos2++) &lt;&lt; 16) | (input[mypos2++]
tmplen = (input.charCodeAt(mypos2++) &lt;&lt; 24) | (input.charCodeAt(mypos2++) &lt;&lt; 16) | (input[mypos2++]
.charCodeAt() &lt;&lt; 8) | input.charCodeAt(mypos2++);
bodydata += input.substring(mypos2, mypos2 + tmplen);
packet_length += tmplen;
@ -277,7 +278,7 @@ module.exports = {
real_packet_length = packet_length;
}
if (bodydata == null) {
if (bodydata === null) {
bodydata = input.substring(mypos, mypos + real_packet_length);
}
@ -287,7 +288,7 @@ module.exports = {
offset: mypos + real_packet_length
};
}
}
};
</code></pre>
</article>
</section>
@ -304,7 +305,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1094,7 +1094,7 @@ class instance.
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:43 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:53 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -66,7 +66,7 @@ module.exports = function packetlist() {
packet.read(parsed.packet);
}
}
};
/**
* Creates a binary representation of openpgp objects contained within the
@ -83,7 +83,7 @@ module.exports = function packetlist() {
}
return bytes;
}
};
/**
* Adds a packet to the list. This is the only supported method of doing so;
@ -96,7 +96,7 @@ module.exports = function packetlist() {
this[this.length] = packet;
this.length++;
}
};
/**
* Creates a new packetList with all packets that pass the test implemented by the provided function.
@ -112,7 +112,7 @@ module.exports = function packetlist() {
}
return filtered;
}
};
/**
* Creates a new packetList with all packets from the given types
@ -123,13 +123,13 @@ module.exports = function packetlist() {
var that = this;
for (var i = 0; i &lt; this.length; i++) {
if (args.some(function(packetType) {return that[i].tag == packetType})) {
if (args.some(function(packetType) {return that[i].tag == packetType;})) {
filtered.push(this[i]);
}
}
return filtered;
}
};
/**
* Executes the provided callback once for each element
@ -138,7 +138,7 @@ module.exports = function packetlist() {
for (var i = 0; i &lt; this.length; i++) {
callback(this[i]);
}
}
};
/**
* Traverses packet tree and returns first matching packet
@ -159,7 +159,7 @@ module.exports = function packetlist() {
}
}
return null;
}
};
/**
* Returns array of found indices by tag
@ -169,26 +169,26 @@ module.exports = function packetlist() {
var tagIndex = [];
var that = this;
for (var i = 0; i &lt; this.length; i++) {
if (args.some(function(packetType) {return that[i].tag == packetType})) {
if (args.some(function(packetType) {return that[i].tag == packetType;})) {
tagIndex.push(i);
}
}
return tagIndex;
}
};
/**
* Returns slice of packetlist
*/
this.slice = function (begin, end) {
if (!end) {
end = this.length
end = this.length;
}
var part = new packetlist();
for (var i = begin; i &lt; end; i++) {
part.push(this[i]);
}
return part;
}
};
/**
* Concatenates packetlist or array of packets
@ -199,9 +199,8 @@ module.exports = function packetlist() {
this.push(packetlist[i]);
}
}
}
}
};
};
</code></pre>
</article>
</section>
@ -218,7 +217,7 @@ module.exports = function packetlist() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -185,7 +185,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -55,7 +55,7 @@
/**
* ASN1 object identifiers for hashes (See RFC4880 5.2.2)
*/
hash_headers = new Array();
hash_headers = [];
hash_headers[1] = [0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04,
0x10
];
@ -110,10 +110,10 @@ module.exports = {
decode: function(message, len) {
if (message.length &lt; len)
message = String.fromCharCode(0) + message;
if (message.length &lt; 12 || message.charCodeAt(0) != 0 || message.charCodeAt(1) != 2)
if (message.length &lt; 12 || message.charCodeAt(0) !== 0 || message.charCodeAt(1) != 2)
return -1;
var i = 2;
while (message.charCodeAt(i) != 0 && message.length > i)
while (message.charCodeAt(i) !== 0 && message.length > i)
i++;
return message.substring(i + 1, message.length);
}
@ -132,14 +132,15 @@ module.exports = {
var data2 = "";
data2 += String.fromCharCode(0x00);
data2 += String.fromCharCode(0x01);
for (var i = 0; i &lt; (keylength - hash_headers[algo].length - 3 -
var i;
for (i = 0; i &lt; (keylength - hash_headers[algo].length - 3 -
hash.getHashByteLength(algo)); i++)
data2 += String.fromCharCode(0xff);
data2 += String.fromCharCode(0x00);
for (var i = 0; i &lt; hash_headers[algo].length; i++)
for (i = 0; i &lt; hash_headers[algo].length; i++)
data2 += String.fromCharCode(hash_headers[algo][i]);
data2 += hash.digest(algo, data);
@ -153,12 +154,12 @@ module.exports = {
*/
decode: function(algo, data) {
var i = 0;
if (data.charCodeAt(0) == 0) i++;
if (data.charCodeAt(0) === 0) i++;
else if (data.charCodeAt(0) != 1) return -1;
else i++;
while (data.charCodeAt(i) == 0xFF) i++;
if (data.charCodeAt(i++) != 0) return -1;
if (data.charCodeAt(i++) !== 0) return -1;
var j = 0;
for (j = 0; j &lt; hash_headers[algo].length && j + i &lt; data.length; j++) {
if (data.charCodeAt(j + i) != hash_headers[algo][j]) return -1;
@ -168,7 +169,7 @@ module.exports = {
return data.substring(i);
}
}
}
};
</code></pre>
</article>
</section>
@ -185,7 +186,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -296,7 +296,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -118,7 +118,7 @@ module.exports = function public_key() {
this.mpi[i] = new type_mpi();
p += this.mpi[i].read(bmpi.substr(p))
p += this.mpi[i].read(bmpi.substr(p));
if (p > bmpi.length) {
throw new Error('Error reading MPI @:' + p);
@ -208,7 +208,7 @@ module.exports = function public_key() {
for (var i = 0; i &lt; mpicount; i++) {
toHash += this.mpi[i].toBytes();
}
return crypto.hash.md5(toHash)
return crypto.hash.md5(toHash);
}
};
};
@ -228,7 +228,7 @@ module.exports = function public_key() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1035,7 +1035,7 @@ header: [string] OpenPGP packet header, string: [string] header+body}
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:44 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:54 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -833,7 +833,7 @@ packets (tag 1)
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:44 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:54 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -151,7 +151,7 @@ module.exports = function public_key_encrypted_session_key() {
enums.write(enums.publicKey, this.publicKeyAlgorithm));
for (var i = 0; i &lt; this.encrypted.length; i++) {
result += this.encrypted[i].write()
result += this.encrypted[i].write();
}
return result;
@ -196,7 +196,7 @@ module.exports = function public_key_encrypted_session_key() {
result,
key.mpi[0].byteLength());
var key = decoded.substring(1, decoded.length - 2);
key = decoded.substring(1, decoded.length - 2);
if (checksum != util.calc_checksum(key)) {
throw new Error('Checksum mismatch');
@ -223,7 +223,7 @@ module.exports = function public_key_encrypted_session_key() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -1070,7 +1070,7 @@ header: [string] OpenPGP packet header, string: [string] header+body}
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:44 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:54 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -55,7 +55,7 @@ var publicKey = require('./public_key.js');
*/
module.exports = function public_subkey() {
publicKey.call(this);
}
};
</code></pre>
</article>
</section>
@ -72,7 +72,7 @@ module.exports = function public_subkey() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -723,7 +723,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -150,7 +150,7 @@ module.exports = {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -111,7 +111,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -52,7 +52,7 @@
*/
var RMDsize = 160;
var X = new Array();
var X = [];
function ROL(x, n) {
return new Number((x &lt;&lt; n) | (x >>> (32 - n)));
@ -125,7 +125,7 @@ function mixOneRound(a, b, c, d, e, x, s, roundNumber) {
d &= 0xffffffff;
e &= 0xffffffff;
var retBlock = new Array();
var retBlock = [];
retBlock[0] = a;
retBlock[1] = b;
retBlock[2] = c;
@ -172,19 +172,21 @@ var indexes = [
];
function compress(MDbuf, X) {
blockA = new Array();
blockB = new Array();
blockA = [];
blockB = [];
var retBlock;
for (var i = 0; i &lt; 5; i++) {
var i, j;
for (i = 0; i &lt; 5; i++) {
blockA[i] = new Number(MDbuf[i]);
blockB[i] = new Number(MDbuf[i]);
}
var step = 0;
for (var j = 0; j &lt; 5; j++) {
for (var i = 0; i &lt; 16; i++) {
for (j = 0; j &lt; 5; j++) {
for (i = 0; i &lt; 16; i++) {
retBlock = mixOneRound(
blockA[(step + 0) % 5],
blockA[(step + 1) % 5],
@ -206,8 +208,8 @@ function compress(MDbuf, X) {
}
step = 0;
for (var j = 5; j &lt; 10; j++) {
for (var i = 0; i &lt; 16; i++) {
for (j = 5; j &lt; 10; j++) {
for (i = 0; i &lt; 16; i++) {
retBlock = mixOneRound(
blockB[(step + 0) % 5],
blockB[(step + 1) % 5],
@ -255,7 +257,7 @@ function MDfinish(MDbuf, strptr, lswlen, mswlen) {
if ((lswlen & 63) > 55) {
compress(MDbuf, X);
var X = new Array(16);
X = new Array(16);
zeroX(X);
}
@ -286,9 +288,9 @@ function RMD(message) {
var X = new Array(16);
zeroX(X);
var j = 0;
for (var nbytes = length; nbytes > 63; nbytes -= 64) {
for (var i = 0; i &lt; 16; i++) {
var i, j = 0;
for (nbytes = length; nbytes > 63; nbytes -= 64) {
for (i = 0; i &lt; 16; i++) {
X[i] = BYTES_TO_DWORD(message.substr(j, 4));
j += 4;
}
@ -297,7 +299,7 @@ function RMD(message) {
MDfinish(MDbuf, message.substr(j), length, 0);
for (var i = 0; i &lt; RMDsize / 8; i += 4) {
for (i = 0; i &lt; RMDsize / 8; i += 4) {
hashcode[i] = MDbuf[i >>> 2] & 255;
hashcode[i + 1] = (MDbuf[i >>> 2] >>> 8) & 255;
hashcode[i + 2] = (MDbuf[i >>> 2] >>> 16) & 255;
@ -336,7 +338,7 @@ module.exports = RMDstring;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -121,7 +121,7 @@
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:41 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:51 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -85,7 +85,7 @@ function RSA() {
util.print_debug("rsa.js decrypt\nxpn:" + util.hexstrdump(xp.toMPI()) + "\nxqn:" + util.hexstrdump(xq.toMPI()));
var t = xq.subtract(xp);
if (t[0] == 0) {
if (t[0] === 0) {
t = xp.subtract(xq);
t = t.multiply(u).mod(q);
t = q.subtract(t);
@ -140,12 +140,12 @@ function RSA() {
for (;;) {
for (;;) {
key.p = new BigInteger(B - qs, 1, rng);
if (key.p.subtract(BigInteger.ONE).gcd(key.ee).compareTo(BigInteger.ONE) == 0 && key.p.isProbablePrime(10))
if (key.p.subtract(BigInteger.ONE).gcd(key.ee).compareTo(BigInteger.ONE) === 0 && key.p.isProbablePrime(10))
break;
}
for (;;) {
key.q = new BigInteger(qs, 1, rng);
if (key.q.subtract(BigInteger.ONE).gcd(key.ee).compareTo(BigInteger.ONE) == 0 && key.q.isProbablePrime(10))
if (key.q.subtract(BigInteger.ONE).gcd(key.ee).compareTo(BigInteger.ONE) === 0 && key.q.isProbablePrime(10))
break;
}
if (key.p.compareTo(key.q) &lt;= 0) {
@ -156,7 +156,7 @@ function RSA() {
var p1 = key.p.subtract(BigInteger.ONE);
var q1 = key.q.subtract(BigInteger.ONE);
var phi = p1.multiply(q1);
if (phi.gcd(key.ee).compareTo(BigInteger.ONE) == 0) {
if (phi.gcd(key.ee).compareTo(BigInteger.ONE) === 0) {
key.n = key.p.multiply(key.q);
key.d = key.ee.modInverse(phi);
key.dmp1 = key.d.mod(p1);
@ -193,7 +193,7 @@ module.exports = RSA;
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -458,7 +458,7 @@ hashAlgorithm
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="s2k.js.html">type/s2k.js</a>, <a href="s2k.js.html#line139">line 139</a>
<a href="s2k.js.html">type/s2k.js</a>, <a href="s2k.js.html#line138">line 138</a>
</li></ul></dd>
@ -689,7 +689,7 @@ hashAlgorithm hash length
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="s2k.js.html">type/s2k.js</a>, <a href="s2k.js.html#line113">line 113</a>
<a href="s2k.js.html">type/s2k.js</a>, <a href="s2k.js.html#line112">line 112</a>
</li></ul></dd>
@ -758,7 +758,7 @@ hashAlgorithm hash length
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:45 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:55 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -126,7 +126,6 @@ module.exports = function s2k() {
default:
throw new Error("Unknown s2k type.");
break;
}
return i;
@ -221,7 +220,7 @@ module.exports = function s2k() {
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:39 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:49 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

View File

@ -312,6 +312,75 @@ major versions. Consequently, this section is complex.</div>
</dl>
</dd>
<dt>
<h4 class="name" id="mpi"><span class="type-signature"></span>mpi<span class="type-signature"> :<a href="mpi.html">module:type/mpi</a></span></h4>
</dt>
<dd>
<div class="description">
A list of multiprecision integers
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type"><a href="mpi.html">module:type/mpi</a></span>
</li>
</ul>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="public_key_.html#mpi">module:packet/public_key#mpi</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="public_key.js.html">packet/public_key.js</a>, <a href="public_key.js.html#line49">line 49</a>
</li></ul></dd>
</dl>
@ -1241,7 +1310,7 @@ to key specifier
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Thu Jan 02 2014 13:02:44 GMT-0800 (PST)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Mon Jan 06 2014 16:27:54 GMT+0100 (MEZ)
</footer>
<script> prettyPrint(); </script>

Some files were not shown because too many files have changed in this diff Show More