Releases: TankerHQ/sdk-js
v1.10.4
v1.10.3
v1.10.2
v1.10.1
Misc changes
FileReader
: reject read in progress if explicitely callingabort()
- Require Node.js engine >= 8 in
@tanker/client-node
- Make dependency on
@babel/runtime-corejs2
explicit in all packages - Bump socket.io and many dev dependencies
- Extend the range of OS-browser combinations tested on BrowserStack
- Rewrite READMEs
v1.10.0
Enhanced simple encryption APIs
The simple encryption APIs have been extended to support:
- encryption / decryption of resources of arbitrary size (previously limited to < 5MB)
- new input and output formats in addition to the already supported
Uint8Array
:ArrayBuffer
Buffer
(Node.js)Blob
andFile
(browsers)
Check the new binary data encryption guide for more information and code samples.
Asynchronous getResourceId()
[Breaking change]
The tanker.getResourceId()
method is now asynchronous:
const encryptedData = await tanker.encrypt('a clear message');
// Adding "await" since getResourceId is now asynchronous:
const resourceId = await tanker.getResourceId(encryptedData);
await tanker.share([resourceId], { shareWithUsers: ['bob'] });
Here are the main benefits of this change:
- it allows to read the id of
Blob
andFile
resources (natively asynchronous formats) - all instance methods are now consistently asynchronous in the JavaScript Tanker SDK
New internal encryption formats
New encryption formats are used internally in order to:
- encrypt small resources in a more compact format (lowering the overhead from 41 to 17 bytes)
- encrypt bigger resources "as a whole" without resorting to chunk encryption
The introduction of these new formats is not a breaking change per se, as data encrypted with previous SDK versions (using older internal formats) are still decryptable with this SDK version.
However, data encrypted with the Tanker SDK 1.10+ can't be decrypted with SDK versions older than 1.10.
As a recap, here is the compatibility table for your encrypted data:
Data encrypted with | Decrypting with SDK < 1.10 | Decrypting with SDK >= 1.10 |
---|---|---|
SDK < 1.10 | ✓ | ✓ |
SDK >= 1.10 | ✗ | ✓ |
Chunk encryption APIs deprecation
With the introduction of the enhanced simple encryption APIs and new internal encryption formats, the Tanker SDK exposes a simple common way to handle resources of arbitrary size.
As a result, the chunk encryption APIs are now deprecated.
Check the migration guide for more information and code samples.
New open-source packages
Useful internal components have been extracted to open-source packages that are freely available to use in your own apps to increase browser compatibility and code readability:
@tanker/file-ponyfill
: a cross-browser ponyfill for File with a working constructor@tanker/file-reader
: a promisified FileReader for browsers
Misc changes
- Improved error messages
v1.9.4
v1.9.3
v1.9.1
v1.9.2
v1.9.0
Changes
- For a simpler and unified registration of unlock methods,
registerUnlock()
replaces the now both deprecatedsetupUnlock()
andupdateUnlock()
. See the migration guide for details. - The
shareWith
option is deprecated. You should now useshareWithUsers
andshareWithGroups
instead. See the migration guide for details. - Bug fixes and performance improvements.