js: fixing errors found by testing: encrypt/decrypt
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Mon, 7 May 2018 16:27:25 +0000 (18:27 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Mon, 7 May 2018 16:27:25 +0000 (18:27 +0200)
commit8f3d83e5f0903323ec92f588f60dcecb0ae96de4
tree65620180493539aacb6f5368a06f3ba63da19d96
parentcf075846fb48c8d71937100d2c45069d37d54a38
js: fixing errors found by testing: encrypt/decrypt

--

* Key.js: Error code for wrong parameter in createKey should be
  "PARAM_WRONG"
* Helpers.js: The property openpgpjs-like Objects were checked for in
  toKeyIdArray was not defined.
* src/permittedOperations.js: updated more expectations and assumptions
  for the native API

* new Problems:
  - There seems to be a message size limit of about 21 MB for
    nativeMessaging, much lower than the documented 4GB.
  - Some bytes are lost with random data in an encrypt-decrypt
    roundtrip. The culprit is unclear.
lang/js/BrowserTestExtension/browsertest.html
lang/js/BrowserTestExtension/tests/encryptDecryptTest.js [new file with mode: 0644]
lang/js/BrowserTestExtension/tests/encryptTest.js
lang/js/BrowserTestExtension/tests/inputvalues.js
lang/js/src/Connection.js
lang/js/src/Message.js
lang/js/unittests.js