Daniel Huigens
77055f6dfe
Don't zero-copy transfer buffers in Safari 11.1 and Chrome < 56
...
See https://bugs.webkit.org/show_bug.cgi?id=184254
and https://bugs.chromium.org/p/chromium/issues/detail?id=334408 .
2019-01-15 20:16:59 +01:00
Daniel Huigens
fe69cb882d
Zero-copy transfer buffers when passing streams to workers
2019-01-09 15:18:59 +01:00
Daniel Huigens
625c6ea4b3
Zero-copy transfer buffers from the worker to the main thread
2019-01-09 15:18:56 +01:00
Sanjana Rajan
37bc379663
Merge pull request #828 from tomholub/patch-1
...
Fix various JSDoc typos etc
2019-01-03 06:55:42 -08:00
Sanjana Rajan
9b599c86b2
Merge pull request #827 from estelendur/double_is_readonly
...
Double is readonly
2019-01-02 15:15:22 -08:00
Daniel Huigens
5c5da1d86f
Fix passing streams to workers in Safari 9
...
Safari 9 does not expose the MessagePort object in workers
(but does expose it on window, and also exposes MessageChannel
in workers).
2019-01-02 14:07:36 +01:00
Tom J
1054ed46d8
Fix util.js jsdoc Uint8Array typos
2018-12-29 11:44:26 +00:00
Esty Thomas
08fdb351d1
Renames var to prevent "double is read-only" error
...
Under some build systems, the function `double` produces an error:
```SyntaxError: "double" is read-only"```
The error goes away if the variable named `double` inside the function
named `double` is renamed. This commit renames it to `double_var` for
simplicity's sake.
2018-12-27 12:27:42 -05:00
Daniel Huigens
9691dc9c99
Fix getExpirationTime with capabilities and an expired signing subkey
...
When the latest subkey with the requested capabilities is expired,
and the primary key has the requested capabilities, return the
primary key expiry instead.
Also, change isExpired/isDataExpired to still return false at the
date returned by getExpirationTime, so that the latter returns the
last date that the key can still be used.
2018-12-21 12:49:22 -05:00
Daniel Huigens
a250ee9f91
Clean up checksum calculation
2018-11-01 14:47:22 +01:00
Daniel Huigens
baaa0716b4
Fix performance issue with handling large messages
2018-10-19 15:09:33 +02:00
Daniel Huigens
00a2c0c0c2
Support unicode surrogate code points
2018-08-14 17:24:40 +02:00
Daniel Huigens
52c4fa9639
Move streams library to a separate package
2018-08-14 16:35:40 +02:00
Daniel Huigens
252da44419
Don't depend on util in stream.js
2018-08-14 16:35:40 +02:00
Daniel Huigens
29271accef
Enable Transferables in IE11
...
Reverts 11ff845c
.
2018-08-14 16:35:40 +02:00
Daniel Huigens
c75e2323c0
Support IE11 for streaming
2018-08-14 16:35:39 +02:00
Daniel Huigens
721e522b17
Don't increase buffering in transformWithCancel
...
Keep backpressure the same as in default TransformStream().
2018-08-14 16:35:39 +02:00
Daniel Huigens
d844b8b06c
Add minimum AEAD buffer size
...
This enables parallelism for streaming AEAD chunked encryption.
The reason we can't do so at the very end of the pipe chain
(e.g., in `readToEnd`) is because requests for increased
buffering (i.e. `desiredSize > 1`) do not propagate backwards,
only requests for backpressure (i.e. `desiredSize <= 0`) do.
2018-08-14 16:35:39 +02:00
Daniel Huigens
ca537e439d
Comments & code style
2018-08-14 16:35:38 +02:00
Daniel Huigens
0cabf72682
Add TextDecoder polyfill
2018-08-10 14:46:27 +02:00
Daniel Huigens
4d82d25559
Pass more tests
...
We now use streams internally in more places.
2018-08-10 14:46:26 +02:00
Daniel Huigens
ddda6a0b16
Implement cancellation by manually linking together input and output streams
2018-08-10 14:46:24 +02:00
Daniel Huigens
9c1c28bc59
Add option to read unauthenticated data from stream
2018-08-10 14:46:23 +02:00
Daniel Huigens
ade2627bca
Streaming verify one-pass signatures
2018-08-10 14:44:01 +02:00
Daniel Huigens
fb155ffae0
Streaming support on Node
2018-08-10 14:44:01 +02:00
Daniel Huigens
802e1b8d94
Transfer Streams to Workers
...
Also, add a "asStream" parameter to high-level functions to control
whether the return value is a Stream; defaulting to whether the
parameter passed was a Stream.
2018-08-10 14:44:01 +02:00
Daniel Huigens
37014ecf30
Pass more tests
...
- Allow leading spaces in headers (since we were already accepting
leading spaces everywhere else in the armored text).
- Read ReadableStreams before passing them to a Worker
2018-08-10 14:44:01 +02:00
Daniel Huigens
db39e616ca
Replace stream.tee() with stream.clone()
...
Also some other fixes to pass more tests.
2018-08-10 14:44:01 +02:00
Daniel Huigens
3475843d82
Don't hack util.concatUint8Array() to handle Streams
...
Use util.concat() instead.
2018-08-10 14:44:01 +02:00
Daniel Huigens
16ba26c298
Streaming AEAD
2018-08-10 14:44:01 +02:00
Daniel Huigens
1f30556674
Split stream.transform into using two helper functions
2018-08-10 14:44:01 +02:00
Daniel Huigens
4ada3fa590
Don't mutate prototypes of Uint8Array, ReadableStream and ReadableStreamDefaultWriter
2018-08-10 14:44:01 +02:00
Daniel Huigens
0af4742a14
Signatures
2018-08-10 14:44:01 +02:00
Daniel Huigens
403bdc5346
Streaming decryption (Web)
2018-08-10 14:44:01 +02:00
Daniel Huigens
9853d3d830
Streaming encryption (Web)
2018-08-10 14:44:01 +02:00
Sanjana Rajan
99d3849ff3
style fix
2018-07-02 11:44:06 +02:00
Tom James Holub
35260cb5db
configurable max uid length | close #724
2018-06-30 04:35:08 +00:00
Sanjana Rajan
c7a65ccd16
fix #716
2018-06-13 15:05:10 +02:00
Wiktor Kwapisiewicz
da98ccb421
Add ZBase32 encoding function
...
See: https://tools.ietf.org/html/rfc6189#section-5.1.6
2018-05-29 09:55:47 +02:00
mmso
11ff845c3e
Don't include transferable on IE11 on postMessage
2018-05-18 09:16:57 +02:00
Sanjana Rajan
4926667cf9
Merge pull request #694 from twiss/eslint-cleanup
...
Remove some ESLint silencers
2018-05-03 08:05:57 -07:00
Daniel Huigens
b5c6e655de
Warn about console usage
2018-05-03 13:07:52 +02:00
Daniel Huigens
95b9e5188a
Remove some ESLint silencers
2018-05-01 17:36:15 +02:00
Daniel Huigens
3c224379f6
Remove util.isUserId()
...
It was not really correct anyway; a user id can just be an email address
without < > brackets.
2018-05-01 13:39:24 +02:00
Daniel Huigens
6c2fec3450
Parse user IDs
...
Also, support comments when creating user IDs
2018-05-01 13:39:23 +02:00
Daniel Huigens
ebeedd3443
Fix removing whitespace from the last line of cleartext signed messages
...
Also, move normalizing line endings and removing whitespace to util functions
2018-04-30 15:55:33 +02:00
Daniel Huigens
d5a7cb3037
Constant-time double() in OCB
2018-04-27 14:06:20 +02:00
Daniel Huigens
cc4cc38fe7
Add util.print_debug_hexarray_dump
2018-04-27 14:06:15 +02:00
Daniel Huigens
f40489aa43
Implement getLeftNBits, shiftLeft and shiftRight for Uint8Arrays
2018-04-27 14:06:14 +02:00
Daniel Huigens
5d43b44e50
Log swallowed errors in debug mode
2018-04-27 14:06:14 +02:00