aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js
diff options
context:
space:
mode:
Diffstat (limited to 'lang/js')
-rw-r--r--lang/js/src/Connection.js4
-rw-r--r--lang/js/src/gpgmejs.js8
2 files changed, 9 insertions, 3 deletions
diff --git a/lang/js/src/Connection.js b/lang/js/src/Connection.js
index 3fd1810d..c4921d53 100644
--- a/lang/js/src/Connection.js
+++ b/lang/js/src/Connection.js
@@ -232,7 +232,9 @@ class Answer{
return gpgme_error('CONN_UNEXPECTED_ANSWER');
}
let _decodedResponse = JSON.parse(atob(this._response_b64));
- let _response = {};
+ let _response = {
+ format: 'ascii'
+ };
let messageKeys = Object.keys(_decodedResponse);
let poa = permittedOperations[this.operation].answer;
if (messageKeys.length === 0){
diff --git a/lang/js/src/gpgmejs.js b/lang/js/src/gpgmejs.js
index 5bdffeb5..b86b5f18 100644
--- a/lang/js/src/gpgmejs.js
+++ b/lang/js/src/gpgmejs.js
@@ -55,8 +55,12 @@ import { createSignature } from './Signature';
/**
* @typedef {Object} encrypt_result The result of an encrypt operation
* @property {String} data The encrypted message
- * @property {Boolean} base64 Indicating whether returning payload data is
- * base64 encoded
+ * @property {String} format Indicating how the data was converted after being
+ * received from gpgme.
+ * 'ascii': Data was ascii-encoded and no further processed
+ * 'string': Data was decoded into an utf-8 string,
+ * 'base64': Data was not processed and is a base64 string
+ * 'uint8': Data was turned into a Uint8Array
*/
/**