@libp2p/keychain 4.0.8 → 4.0.9-1fc929c1c
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 +22 -5
- package/dist/index.min.js +3 -3
- package/dist/src/index.d.ts +17 -16
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +6 -5
- package/dist/src/index.js.map +1 -1
- package/package.json +12 -11
- package/src/index.ts +17 -16
- package/dist/typedoc-urls.json +0 -14
package/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# @libp2p/keychain
|
|
2
|
+
|
|
1
3
|
[](http://libp2p.io/)
|
|
2
4
|
[](https://discuss.libp2p.io)
|
|
3
5
|
[](https://codecov.io/gh/libp2p/js-libp2p)
|
|
@@ -7,6 +9,21 @@
|
|
|
7
9
|
|
|
8
10
|
# About
|
|
9
11
|
|
|
12
|
+
<!--
|
|
13
|
+
|
|
14
|
+
!IMPORTANT!
|
|
15
|
+
|
|
16
|
+
Everything in this README between "# About" and "# Install" is automatically
|
|
17
|
+
generated and will be overwritten the next time the doc generator is run.
|
|
18
|
+
|
|
19
|
+
To make changes to this section, please update the @packageDocumentation section
|
|
20
|
+
of src/index.js or src/index.ts
|
|
21
|
+
|
|
22
|
+
To experiment with formatting, please run "npm run docs" from the root of this
|
|
23
|
+
repo and examine the changes made.
|
|
24
|
+
|
|
25
|
+
-->
|
|
26
|
+
|
|
10
27
|
- Manages the lifecycle of a key
|
|
11
28
|
- Keys are encrypted at rest
|
|
12
29
|
- Enforces the use of safe key names
|
|
@@ -19,10 +36,10 @@
|
|
|
19
36
|
|
|
20
37
|
The key management and naming service API all return a `KeyInfo` object. The `id` is a universally unique identifier for the key. The `name` is local to the key chain.
|
|
21
38
|
|
|
22
|
-
```
|
|
39
|
+
```JSON
|
|
23
40
|
{
|
|
24
|
-
name:
|
|
25
|
-
id:
|
|
41
|
+
"name": "rsa-key",
|
|
42
|
+
"id": "QmYWYSUZ4PV6MRFYpdtEDJBiGs4UrmE6g8wmAWSePekXVW"
|
|
26
43
|
}
|
|
27
44
|
```
|
|
28
45
|
|
|
@@ -36,9 +53,9 @@ A private key is stored as an encrypted PKCS 8 structure in the PEM format. It i
|
|
|
36
53
|
|
|
37
54
|
The default options for generating the derived encryption key are in the `dek` object. This, along with the passPhrase, is the input to a `PBKDF2` function.
|
|
38
55
|
|
|
39
|
-
```
|
|
56
|
+
```TypeScript
|
|
40
57
|
const defaultOptions = {
|
|
41
|
-
// See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
58
|
+
// See https://cryptosense.com/parameter-choice-for-pbkdf2/
|
|
42
59
|
dek: {
|
|
43
60
|
keyLength: 512 / 8,
|
|
44
61
|
iterationCount: 1000,
|