commit
fa208e8308
22
dist/openpgp.js
vendored
22
dist/openpgp.js
vendored
|
@ -4141,7 +4141,7 @@ function defaultClearTimeout () {
|
||||||
} ())
|
} ())
|
||||||
function runTimeout(fun) {
|
function runTimeout(fun) {
|
||||||
if (cachedSetTimeout === setTimeout) {
|
if (cachedSetTimeout === setTimeout) {
|
||||||
//normal enviroments in sane situations
|
//normal environments in sane situations
|
||||||
return setTimeout(fun, 0);
|
return setTimeout(fun, 0);
|
||||||
}
|
}
|
||||||
// if setTimeout wasn't available but was latter defined
|
// if setTimeout wasn't available but was latter defined
|
||||||
|
@ -4166,7 +4166,7 @@ function runTimeout(fun) {
|
||||||
}
|
}
|
||||||
function runClearTimeout(marker) {
|
function runClearTimeout(marker) {
|
||||||
if (cachedClearTimeout === clearTimeout) {
|
if (cachedClearTimeout === clearTimeout) {
|
||||||
//normal enviroments in sane situations
|
//normal environments in sane situations
|
||||||
return clearTimeout(marker);
|
return clearTimeout(marker);
|
||||||
}
|
}
|
||||||
// if clearTimeout wasn't available but was latter defined
|
// if clearTimeout wasn't available but was latter defined
|
||||||
|
@ -4506,7 +4506,7 @@ process.umask = function() { return 0; };
|
||||||
// The size of the heap is the sum of:
|
// The size of the heap is the sum of:
|
||||||
// 1. The padded input message size
|
// 1. The padded input message size
|
||||||
// 2. The extended space the algorithm needs (320 byte)
|
// 2. The extended space the algorithm needs (320 byte)
|
||||||
// 3. The 160 bit state the algoritm uses
|
// 3. The 160 bit state the algorithm uses
|
||||||
self$2.heap = new ArrayBuffer(ceilHeapSize(self$2.padMaxChunkLen + 320 + 20));
|
self$2.heap = new ArrayBuffer(ceilHeapSize(self$2.padMaxChunkLen + 320 + 20));
|
||||||
self$2.h32 = new Int32Array(self$2.heap);
|
self$2.h32 = new Int32Array(self$2.heap);
|
||||||
self$2.h8 = new Int8Array(self$2.heap);
|
self$2.h8 = new Int8Array(self$2.heap);
|
||||||
|
@ -8930,7 +8930,7 @@ function safeAdd_64_2(x, y) {
|
||||||
* @param {Int_64} a The first 64-bit integer argument to be added
|
* @param {Int_64} a The first 64-bit integer argument to be added
|
||||||
* @param {Int_64} b The second 64-bit integer argument to be added
|
* @param {Int_64} b The second 64-bit integer argument to be added
|
||||||
* @param {Int_64} c The third 64-bit integer argument to be added
|
* @param {Int_64} c The third 64-bit integer argument to be added
|
||||||
* @param {Int_64} d The fouth 64-bit integer argument to be added
|
* @param {Int_64} d The fourth 64-bit integer argument to be added
|
||||||
* @return {Int_64} The sum of a + b + c + d
|
* @return {Int_64} The sum of a + b + c + d
|
||||||
*/
|
*/
|
||||||
function safeAdd_64_4(a, b, c, d) {
|
function safeAdd_64_4(a, b, c, d) {
|
||||||
|
@ -8955,8 +8955,8 @@ function safeAdd_64_4(a, b, c, d) {
|
||||||
* @param {Int_64} a The first 64-bit integer argument to be added
|
* @param {Int_64} a The first 64-bit integer argument to be added
|
||||||
* @param {Int_64} b The second 64-bit integer argument to be added
|
* @param {Int_64} b The second 64-bit integer argument to be added
|
||||||
* @param {Int_64} c The third 64-bit integer argument to be added
|
* @param {Int_64} c The third 64-bit integer argument to be added
|
||||||
* @param {Int_64} d The fouth 64-bit integer argument to be added
|
* @param {Int_64} d The fourth 64-bit integer argument to be added
|
||||||
* @param {Int_64} e The fouth 64-bit integer argument to be added
|
* @param {Int_64} e The fourth 64-bit integer argument to be added
|
||||||
* @return {Int_64} The sum of a + b + c + d + e
|
* @return {Int_64} The sum of a + b + c + d + e
|
||||||
*/
|
*/
|
||||||
function safeAdd_64_5(a, b, c, d, e) {
|
function safeAdd_64_5(a, b, c, d, e) {
|
||||||
|
@ -13432,7 +13432,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
||||||
exports.default = openpgp;
|
exports.default = openpgp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export each high level api function seperately.
|
* Export each high level api function separately.
|
||||||
* Usage:
|
* Usage:
|
||||||
*
|
*
|
||||||
* import { encryptMessage } from 'openpgp.js'
|
* import { encryptMessage } from 'openpgp.js'
|
||||||
|
@ -13838,7 +13838,7 @@ function isValidSigningKeyPacket(keyPacket, signature) {
|
||||||
* @returns {(module:packet/public_subkey|module:packet/secret_subkey|module:packet/secret_key|module:packet/public_key|null)} key packet or null if no encryption key has been found
|
* @returns {(module:packet/public_subkey|module:packet/secret_subkey|module:packet/secret_key|module:packet/public_key|null)} key packet or null if no encryption key has been found
|
||||||
*/
|
*/
|
||||||
Key.prototype.getEncryptionKeyPacket = function () {
|
Key.prototype.getEncryptionKeyPacket = function () {
|
||||||
// V4: by convention subkeys are prefered for encryption service
|
// V4: by convention subkeys are preferred for encryption service
|
||||||
// V3: keys MUST NOT have subkeys
|
// V3: keys MUST NOT have subkeys
|
||||||
if (this.subKeys) {
|
if (this.subKeys) {
|
||||||
for (var i = 0; i < this.subKeys.length; i++) {
|
for (var i = 0; i < this.subKeys.length; i++) {
|
||||||
|
@ -14033,7 +14033,7 @@ Key.prototype.getPrimaryUser = function () {
|
||||||
* users, subkeys, certificates are merged into the destination key,
|
* users, subkeys, certificates are merged into the destination key,
|
||||||
* duplicates are ignored.
|
* duplicates are ignored.
|
||||||
* If the specified key is a private key and the destination key is public,
|
* If the specified key is a private key and the destination key is public,
|
||||||
* the destination key is tranformed to a private key.
|
* the destination key is transformed to a private key.
|
||||||
* @param {module:key~Key} key source key to merge
|
* @param {module:key~Key} key source key to merge
|
||||||
*/
|
*/
|
||||||
Key.prototype.update = function (key) {
|
Key.prototype.update = function (key) {
|
||||||
|
@ -16762,7 +16762,7 @@ function packetClassFromTagName(tag) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fileoverview This module implements packet list cloning required to
|
* @fileoverview This module implements packet list cloning required to
|
||||||
* pass certain object types beteen the web worker and main thread using
|
* pass certain object types between the web worker and main thread using
|
||||||
* the structured cloning algorithm.
|
* the structured cloning algorithm.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -20548,7 +20548,7 @@ Keyid.fromId = function (hex) {
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
// Hint: We hold our MPIs as an array of octets in big endian format preceeding a two
|
// Hint: We hold our MPIs as an array of octets in big endian format preceding a two
|
||||||
// octet scalar: MPI: [a,b,c,d,e,f]
|
// octet scalar: MPI: [a,b,c,d,e,f]
|
||||||
// - MPI size: (a << 8) | b
|
// - MPI size: (a << 8) | b
|
||||||
// - MPI = c | d << 8 | e << ((MPI.length -2)*8) | f ((MPI.length -2)*8)
|
// - MPI = c | d << 8 | e << ((MPI.length -2)*8) | f ((MPI.length -2)*8)
|
||||||
|
|
|
@ -813,7 +813,7 @@ function safeAdd_64_2(x, y)
|
||||||
* @param {Int_64} a The first 64-bit integer argument to be added
|
* @param {Int_64} a The first 64-bit integer argument to be added
|
||||||
* @param {Int_64} b The second 64-bit integer argument to be added
|
* @param {Int_64} b The second 64-bit integer argument to be added
|
||||||
* @param {Int_64} c The third 64-bit integer argument to be added
|
* @param {Int_64} c The third 64-bit integer argument to be added
|
||||||
* @param {Int_64} d The fouth 64-bit integer argument to be added
|
* @param {Int_64} d The fourth 64-bit integer argument to be added
|
||||||
* @return {Int_64} The sum of a + b + c + d
|
* @return {Int_64} The sum of a + b + c + d
|
||||||
*/
|
*/
|
||||||
function safeAdd_64_4(a, b, c, d)
|
function safeAdd_64_4(a, b, c, d)
|
||||||
|
@ -843,8 +843,8 @@ function safeAdd_64_4(a, b, c, d)
|
||||||
* @param {Int_64} a The first 64-bit integer argument to be added
|
* @param {Int_64} a The first 64-bit integer argument to be added
|
||||||
* @param {Int_64} b The second 64-bit integer argument to be added
|
* @param {Int_64} b The second 64-bit integer argument to be added
|
||||||
* @param {Int_64} c The third 64-bit integer argument to be added
|
* @param {Int_64} c The third 64-bit integer argument to be added
|
||||||
* @param {Int_64} d The fouth 64-bit integer argument to be added
|
* @param {Int_64} d The fourth 64-bit integer argument to be added
|
||||||
* @param {Int_64} e The fouth 64-bit integer argument to be added
|
* @param {Int_64} e The fourth 64-bit integer argument to be added
|
||||||
* @return {Int_64} The sum of a + b + c + d + e
|
* @return {Int_64} The sum of a + b + c + d + e
|
||||||
*/
|
*/
|
||||||
function safeAdd_64_5(a, b, c, d, e)
|
function safeAdd_64_5(a, b, c, d, e)
|
||||||
|
|
|
@ -13,7 +13,7 @@ import * as openpgp from './openpgp';
|
||||||
export default openpgp;
|
export default openpgp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export each high level api function seperately.
|
* Export each high level api function separately.
|
||||||
* Usage:
|
* Usage:
|
||||||
*
|
*
|
||||||
* import { encryptMessage } from 'openpgp.js'
|
* import { encryptMessage } from 'openpgp.js'
|
||||||
|
|
|
@ -360,7 +360,7 @@ function isValidSigningKeyPacket(keyPacket, signature, allowExpired=false) {
|
||||||
* @returns {(module:packet/public_subkey|module:packet/secret_subkey|module:packet/secret_key|module:packet/public_key|null)} key packet or null if no encryption key has been found
|
* @returns {(module:packet/public_subkey|module:packet/secret_subkey|module:packet/secret_key|module:packet/public_key|null)} key packet or null if no encryption key has been found
|
||||||
*/
|
*/
|
||||||
Key.prototype.getEncryptionKeyPacket = function(keyId) {
|
Key.prototype.getEncryptionKeyPacket = function(keyId) {
|
||||||
// V4: by convention subkeys are prefered for encryption service
|
// V4: by convention subkeys are preferred for encryption service
|
||||||
// V3: keys MUST NOT have subkeys
|
// V3: keys MUST NOT have subkeys
|
||||||
if (this.subKeys) {
|
if (this.subKeys) {
|
||||||
for (var i = 0; i < this.subKeys.length; i++) {
|
for (var i = 0; i < this.subKeys.length; i++) {
|
||||||
|
@ -552,7 +552,7 @@ Key.prototype.getPrimaryUser = function(allowExpired=false) {
|
||||||
* users, subkeys, certificates are merged into the destination key,
|
* users, subkeys, certificates are merged into the destination key,
|
||||||
* duplicates are ignored.
|
* duplicates are ignored.
|
||||||
* If the specified key is a private key and the destination key is public,
|
* If the specified key is a private key and the destination key is public,
|
||||||
* the destination key is tranformed to a private key.
|
* the destination key is transformed to a private key.
|
||||||
* @param {module:key~Key} key source key to merge
|
* @param {module:key~Key} key source key to merge
|
||||||
*/
|
*/
|
||||||
Key.prototype.update = async function(key) {
|
Key.prototype.update = async function(key) {
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fileoverview This module implements packet list cloning required to
|
* @fileoverview This module implements packet list cloning required to
|
||||||
* pass certain object types beteen the web worker and main thread using
|
* pass certain object types between the web worker and main thread using
|
||||||
* the structured cloning algorithm.
|
* the structured cloning algorithm.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
// License along with this library; if not, write to the Free Software
|
// License along with this library; if not, write to the Free Software
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
// Hint: We hold our MPIs as an array of octets in big endian format preceeding a two
|
// Hint: We hold our MPIs as an array of octets in big endian format preceding a two
|
||||||
// octet scalar: MPI: [a,b,c,d,e,f]
|
// octet scalar: MPI: [a,b,c,d,e,f]
|
||||||
// - MPI size: (a << 8) | b
|
// - MPI size: (a << 8) | b
|
||||||
// - MPI = c | d << 8 | e << ((MPI.length -2)*8) | f ((MPI.length -2)*8)
|
// - MPI = c | d << 8 | e << ((MPI.length -2)*8) | f ((MPI.length -2)*8)
|
||||||
|
|
|
@ -1346,7 +1346,7 @@ describe('OpenPGP.js public api tests', function() {
|
||||||
return openpgp.decrypt(decOpt);
|
return openpgp.decrypt(decOpt);
|
||||||
}).then(function(decrypted) {
|
}).then(function(decrypted) {
|
||||||
if (openpgp.getWorker()) {
|
if (openpgp.getWorker()) {
|
||||||
expect(encOpt.data.byteLength).to.equal(0); // transfered buffer should be empty
|
expect(encOpt.data.byteLength).to.equal(0); // transferred buffer should be empty
|
||||||
}
|
}
|
||||||
expect(decrypted.data).to.deep.equal(new Uint8Array([0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]));
|
expect(decrypted.data).to.deep.equal(new Uint8Array([0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01]));
|
||||||
expect(decrypted.signatures.length).to.equal(0);
|
expect(decrypted.signatures.length).to.equal(0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user