@substrate-system/crypto-stream 0.0.34 → 0.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,10 +18,10 @@ This uses the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/
|
|
|
18
18
|
|
|
19
19
|
<!-- toc -->
|
|
20
20
|
|
|
21
|
-
- [
|
|
22
|
-
- [
|
|
23
|
-
- [
|
|
24
|
-
* [
|
|
21
|
+
- [Install](#install)
|
|
22
|
+
- [Fork](#fork)
|
|
23
|
+
- [Example](#example)
|
|
24
|
+
* [Example With Blobs](#example-with-blobs)
|
|
25
25
|
- [API](#api)
|
|
26
26
|
* [`new Keychain([key, [salt]])`](#new-keychainkey-salt)
|
|
27
27
|
* [`keychain.key`](#keychainkey)
|
|
@@ -47,15 +47,17 @@ This uses the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/
|
|
|
47
47
|
|
|
48
48
|
</details>
|
|
49
49
|
|
|
50
|
-
##
|
|
50
|
+
## Install
|
|
51
|
+
|
|
51
52
|
```sh
|
|
52
53
|
npm i -S @substrate-system/crypto-stream
|
|
53
54
|
```
|
|
54
55
|
|
|
55
|
-
##
|
|
56
|
+
## Fork
|
|
57
|
+
|
|
56
58
|
This is a fork of [SocketDev/wormhole-crypto](https://github.com/SocketDev/wormhole-crypto). Thanks [@SocketDev](https://github.com/SocketDev) team for working in open source.
|
|
57
59
|
|
|
58
|
-
##
|
|
60
|
+
## Example
|
|
59
61
|
|
|
60
62
|
```js
|
|
61
63
|
import { Keychain } from '@substrate-system/crypto-stream'
|
|
@@ -78,7 +80,7 @@ const plaintextStream = await keychain.decryptStream(encryptedStream)
|
|
|
78
80
|
// to if you had used `stream`.
|
|
79
81
|
```
|
|
80
82
|
|
|
81
|
-
###
|
|
83
|
+
### Example With Blobs
|
|
82
84
|
|
|
83
85
|
See [./example](./example/index.ts) for a version that uses blobs + a
|
|
84
86
|
local `vite` server.
|
|
@@ -363,4 +365,8 @@ Given a plaintext size, return the corresponding encrypted size.
|
|
|
363
365
|
|
|
364
366
|
## credits
|
|
365
367
|
|
|
366
|
-
Thank you
|
|
368
|
+
Thank you
|
|
369
|
+
[Feross](https://github.com/feross) and
|
|
370
|
+
[SocketDev](https://github.com/SocketDev)
|
|
371
|
+
team for writing and publishing the original,
|
|
372
|
+
[wormhole-crypto](https://github.com/SocketDev/wormhole-crypto).
|