From 129fa919b935d97d995bc6b457c7f6984c06e825 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 22 Aug 2018 16:32:31 +0200 Subject: js: improve decryption performance -- * src/Connection.js, src/Helpers.js: performance of decoding incoming base64 data was improved to about 4 times the speed by introducing two more efficient functions (thanks to rrenkert@intevation.de for finding and testing them) * src/gpgmejs.js: Decrypted data will now return as Uint8Array, if the caller does not wish for a decoding. Decoding binary data will return invalid data, and a Uint8Array may be desired. This can be indicated by using the (new) 'binary' option in decrypt. * src/Errors.js A new error in case this decoding fails * src/Message.js, src/Connection.js: expected is change from base64 to binary, to avoid confusion later on. --- lang/js/src/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/js/src/Message.js') diff --git a/lang/js/src/Message.js b/lang/js/src/Message.js index b83caf6d..48813df7 100644 --- a/lang/js/src/Message.js +++ b/lang/js/src/Message.js @@ -64,7 +64,7 @@ export class GPGME_Message { } set expected (value){ - if (value === 'base64'){ + if (value === 'binary'){ this._expected = value; } } -- cgit v1.2.3