137 Commits

Author SHA1 Message Date
larabr
538b5b6304 Set Node 16 as minimum supported version in package.json 2023-10-25 12:53:11 +02:00
larabr
e07a0c432a Replace hash.js with noble-hashes 2023-10-25 12:53:11 +02:00
larabr
b3ef95e60e Tests: update sinon 2023-10-25 12:53:11 +02:00
larabr
21a6d83ec8 Update asmcrypto.js, use for AES only (move to noble-hashes for sha1, sha256) 2023-10-25 12:53:10 +02:00
larabr
0b2767fe4c Replace pako with fflate as compression lib
fflate already supports ESM and is actively maintained
2023-10-25 12:53:10 +02:00
larabr
d49d92e5cb Update to Mocha v10 in tests, declare lib as module and add exports to package.json
Mocha v10 requires the lib to be esm compliant.
ESM mandates the use of file extensions in imports, so to minimize the
changes (for now), we rely on the flag `experimental-specifier-resolution=node`
and on `ts-node` (needed only for Node 20).

Breaking changes:
downstream bundlers might be affected by the package.json changes depending on
how they load the library.
NB: legacy package.json entrypoints are still available.
2023-10-25 12:53:10 +02:00
larabr
ebf22f2ee7 crypto-refresh: add support for Argon2 S2K (#1597)
In terms of API, this feature is backwards compatible, no breaking changes.
However, since a Wasm module is loaded for the Argon2 computation, browser apps
might need to make changes to their CSP policy in order to use the feature.

Newly introduced config fields:
- `config.s2kType` (defaulting to `enums.s2k.iterated`): s2k to use on
password-based encryption as well as private key encryption;
- `config.s2kArgon2Params` (defaulting to "uniformly safe settings" from Argon
RFC): parameters to use on encryption when `config.s2kType` is set to
`enums.s2k.argon2`;
2023-10-25 12:53:10 +02:00
Daniel Huigens
cec4e029f0 Update web-stream-tools 2023-10-25 12:53:10 +02:00
larabr
7003d19c71 5.11.0 2023-10-25 12:04:48 +02:00
larabr
96d6e76c05
Fix stream closure when using Node's stream.pipeline (#1691) 2023-10-11 17:30:36 +02:00
larabr
d6145ac73e 5.10.2 2023-09-18 14:47:25 +02:00
larabr
5d02e3a03e 5.10.1 2023-08-29 16:52:34 +02:00
larabr
4df86e53a7 5.10.0 2023-08-29 14:59:17 +02:00
larabr
400b163f84 5.9.0 2023-05-15 16:47:20 +02:00
Daniel Huigens
726ee55de4 5.8.0 2023-04-18 19:21:24 +02:00
Daniel Huigens
c60f2e3490 5.7.0 2023-02-21 19:14:36 +01:00
larabr
705f238e1e Update ESlint 2023-02-21 18:27:56 +01:00
larabr
1b17132631 Update deps 2023-02-21 18:25:28 +01:00
larabr
080b49a4ce
Merge pull request #1549 from larabr/test-update-karma-browsers 2023-02-21 16:16:55 +01:00
larabr
18333999a2 CI: test latest browsers without Browserstack, cache build step across jobs 2023-02-20 16:08:10 +01:00
larabr
b083e1d067 Update Karma 2023-02-20 15:34:39 +01:00
Daniel Huigens
0307111993 5.6.0 2023-02-16 14:32:01 +01:00
larabr
04488af790 Bump package lock version 2022-10-24 14:15:04 +02:00
Daniel Huigens
d0be98feb9 5.5.0 2022-08-31 13:56:51 +02:00
larabr
ca60884c05 5.4.0 2022-08-08 13:49:52 +02:00
Daniel Huigens
dd2aa7c5ec Revert package lock version bump 2022-06-29 21:07:10 +02:00
Daniel Huigens
5c02953b1c 5.3.1 2022-06-29 21:02:15 +02:00
Daniel Huigens
e69d8b24fc
Fix armor error handling (#1541)
Fix unhandled promise rejections when parsing armor with malformed footers.
2022-06-29 20:09:30 +02:00
larabr
b677ab5949 5.3.0 2022-06-08 16:10:17 +02:00
Daniel Huigens
d677c30359 5.2.1 2022-03-15 14:59:45 +01:00
larabr
d89cc48bf3
TypeScript: rely on new web-stream-tools types, fix SignOptions (#1502)
The updated stream types improve type inference and checks, in particular when
using ReadableStreams.

Also:
- add `EncryptSessionKeyOptions` to make it easier to declare wrapper functions
of `encryptSessionKey`;
- tighter output type inference in `Message.getText()` and `.getLiteralData()`.
2022-03-09 17:00:12 +01:00
Daniel Huigens
a1ef5f509f 5.2.0 2022-03-02 21:35:43 +01:00
larabr
7aaa34ddfc
CI: update mocha (#1503)
Update to mocha@8 instead of 9 because the latter dropped support for `--require
esm`, hence using it would require more extensive changes.
2022-03-01 16:34:52 +01:00
Daniel Huigens
717f6bffe4 Update web-stream-tools 2022-02-01 16:24:52 +01:00
Daniel Huigens
bd13edfc88 5.1.0 2022-01-24 18:38:46 +01:00
Daniel Huigens
05e435aae7 5.0.1 2021-11-17 21:46:14 +01:00
Daniel Huigens
1d2093ab0a
Update web stream tools and improve performance (#1439)
Optimize reading literal data packet from ArrayStreams, and update
web-stream-tools (with various performance improvements).
2021-11-17 21:34:04 +01:00
larabr
421733e21b
CI: Add performance regression monitoring for pull requests (#1411) 2021-10-14 18:59:14 +02:00
Daniel Huigens
acafb28661 5.0.0 2021-09-02 17:09:02 +02:00
Daniel Huigens
4f1c474433 5.0.0-6 2021-08-20 15:34:03 +02:00
Daniel Huigens
f59b0dec60 5.0.0-5 2021-07-23 19:00:19 +02:00
larabr
7ebdd6a2a6
Update dependencies (#1383) 2021-07-23 12:59:39 +02:00
Daniel Huigens
1837077012 5.0.0-4 2021-07-20 19:41:10 +02:00
Daniel Huigens
5e997605b3 Update web-stream-tools 2021-07-20 19:06:31 +02:00
Daniel Huigens
1bff8aad50 5.0.0-3 2021-05-28 17:36:43 +02:00
Daniel Huigens
5ae7fc4444 Update pako 2021-05-26 10:51:25 +02:00
Daniel Huigens
93b77669bc
Unexport openpgp.stream (#1291)
This change allows us to only load the `ReadableStream` polyfill when
needed without behaving inconsistently in the external API.

Users of the library should use the global `ReadableStream` or Node.js
`stream.Readable` instead, or import a polyfill if needed. This patch
loosens the detection criteria such that polyfilled streams are better
detected.
2021-05-05 20:20:20 +02:00
Daniel Huigens
2d07c43030 5.0.0-2 2021-04-27 14:00:54 +02:00
Daniel Huigens
e599cee6c8 Remove top-level streaming options
Only return a stream if a stream was passed.
2021-03-26 10:56:02 +01:00
Daniel Huigens
18ec54bf4b Fetch Streams ponyfill on demand in lightweight build 2021-03-26 10:56:02 +01:00