aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/BrowserTestExtension/tests/openpgpModeTest.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/BrowserTestExtension/tests/openpgpModeTest.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 'lang/js/BrowserTestExtension/tests/openpgpModeTest.js')
-rw-r--r--lang/js/BrowserTestExtension/tests/openpgpModeTest.js27
1 files changed, 0 insertions, 27 deletions
diff --git a/lang/js/BrowserTestExtension/tests/openpgpModeTest.js b/lang/js/BrowserTestExtension/tests/openpgpModeTest.js
index 98b6e1d8..cccaf604 100644
--- a/lang/js/BrowserTestExtension/tests/openpgpModeTest.js
+++ b/lang/js/BrowserTestExtension/tests/openpgpModeTest.js
@@ -41,33 +41,6 @@ describe('Encrypting-Decrypting in openpgp mode, using a Message object', functi
});
});
});
- it('Encrypt-Decrypt, sending Uint8Array as data', function (done) {
- //TODO! fails. Reason is that atob<->btoa destroys the uint8Array,
- // resulting in a string of constituyent numbers
- // (error already occurs in encryption)
-
- let prm = Gpgmejs.init({api_style: 'gpgme_openpgpjs'});
- prm.then(function (context) {
- let input = bigUint8(0.3);
- expect(input).to.be.an.instanceof(Uint8Array);
- context.encrypt({
- data: input,
- publicKeys: inputvalues.encrypt.good.fingerprint}
- ).then(function (answer) {
- expect(answer).to.not.be.empty;
- expect(answer.data).to.be.a("string");
- expect(answer.data).to.include('BEGIN PGP MESSAGE');
- expect(answer.data).to.include('END PGP MESSAGE');
- context.decrypt({message:answer.data}).then(function (result) {
- expect(result).to.not.be.empty;
- expect(result.data).to.be.an.instanceof(Uint8Array);
- expect(result.data).to.equal(input);
- context._GpgME.connection.disconnect();
- done();
- });
- });
- });
- });
it('Keys as Fingerprints', function(done){
let prm = Gpgmejs.init({api_style: 'gpgme_openpgpjs'});
let input = inputvalues.encrypt.good.data_nonascii;