aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Message.js
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-05-22 12:24:16 +0000
committerMaximilian Krambach <[email protected]>2018-05-22 12:24:16 +0000
commitecad77263585cd5954758f797327d98232d880dc (patch)
treec7654c406f4e838a06f646be8cbb6798e38b1bd9 /lang/js/src/Message.js
parentjs: Testing lare messages (diff)
downloadgpgme-ecad77263585cd5954758f797327d98232d880dc.tar.gz
gpgme-ecad77263585cd5954758f797327d98232d880dc.zip
js: transfer encoding changes
-- * Uint8Arrays are not supported for now there are unsolved issues in conversion, and they are lower priority * encrypt gains a new option to indicate that input values are base64 encoded * as decrypted values are always base64 encoded, the option base64 will not try to decode the result into utf, but leave it as it is
Diffstat (limited to '')
-rw-r--r--lang/js/src/Message.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lang/js/src/Message.js b/lang/js/src/Message.js
index 6a59c3e0..932212a6 100644
--- a/lang/js/src/Message.js
+++ b/lang/js/src/Message.js
@@ -41,6 +41,7 @@ export class GPGME_Message {
constructor(operation){
this.operation = operation;
+ this._expected = 'string';
}
set operation (op){
@@ -58,6 +59,19 @@ export class GPGME_Message {
return this._msg.op;
}
+ set expected(string){
+ if (string === 'base64'){
+ this._expected = 'base64';
+ }
+ }
+
+ get expected() {
+ if (this._expected === "base64"){
+ return this._expected;
+ }
+ return "string";
+ }
+
/**
* Sets a parameter for the message. Note that the operation has to be set
* first, to be able to check if the parameter is permittted