v1.1.1: show key examples in docs
This commit is contained in:
parent
e3bd35470e
commit
8b7e07e172
19
README.md
19
README.md
@ -77,6 +77,14 @@ eckles.export({ jwk: jwk, format: 'pkcs8' }).then(function (pem) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
-----BEGIN EC PRIVATE KEY-----
|
||||||
|
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgiYydo27aNGO9DBUW
|
||||||
|
eGEPD8oNi1LZDqfxPmQlieLBjVShRANCAAQhPVJYvGxpw+ITlnXqOSikCfz/7zms
|
||||||
|
yODIKiSueMN+3pj9icDgDnTJl7sKcWyp4Nymc9u5s/pyliJVyd680hjK
|
||||||
|
-----END EC PRIVATE KEY-----
|
||||||
|
```
|
||||||
|
|
||||||
`format: 'ssh'`:
|
`format: 'ssh'`:
|
||||||
|
|
||||||
Although SSH uses SEC1 for private keys, it uses ts own special non-ASN1 format
|
Although SSH uses SEC1 for private keys, it uses ts own special non-ASN1 format
|
||||||
@ -93,6 +101,10 @@ eckles.export({ jwk: jwk, format: 'ssh' }).then(function (pub) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCE9Uli8bGnD4hOWdeo5KKQJ/P/vOazI4MgqJK54w37emP2JwOAOdMmXuwpxbKng3KZz27mz+nKWIlXJ3rzSGMo= P-256@localhost
|
||||||
|
```
|
||||||
|
|
||||||
`public: 'true'`:
|
`public: 'true'`:
|
||||||
|
|
||||||
If a private key is used as input, a private key will be output.
|
If a private key is used as input, a private key will be output.
|
||||||
@ -106,6 +118,13 @@ eckles.export({ jwk: jwk, public: true }).then(function (pem) {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
-----BEGIN PUBLIC KEY-----
|
||||||
|
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEIT1SWLxsacPiE5Z16jkopAn8/+85
|
||||||
|
rMjgyCokrnjDft6Y/YnA4A50yZe7CnFsqeDcpnPbubP6cpYiVcnevNIYyg==
|
||||||
|
-----END PUBLIC KEY-----
|
||||||
|
```
|
||||||
|
|
||||||
Goals of this project
|
Goals of this project
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eckles",
|
"name": "eckles",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "PEM-to-JWK and JWK-to-PEM for ECDSA keys in a lightweight, zero-dependency library focused on perfect universal compatibility.",
|
"description": "PEM-to-JWK and JWK-to-PEM for ECDSA keys in a lightweight, zero-dependency library focused on perfect universal compatibility.",
|
||||||
"homepage": "https://git.coolaj86.com/coolaj86/eckles.js",
|
"homepage": "https://git.coolaj86.com/coolaj86/eckles.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user