doc: update README and help
This commit is contained in:
parent
286cf11070
commit
be38720eba
39
README.md
39
README.md
|
@ -1,5 +1,44 @@
|
||||||
# [keypairs](https://git.rootprojects.org/root/keypairs)
|
# [keypairs](https://git.rootprojects.org/root/keypairs)
|
||||||
|
|
||||||
|
A cross-platform Command Line Tool and Golang Library that works
|
||||||
|
with RSA, ECDSA, PEM, DER, JWK, and the JOSE suite.
|
||||||
|
|
||||||
|
# Keypairs CLI
|
||||||
|
|
||||||
|
Generates, signs, and verifies with NIST-strength asymmetric keys.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate JSON Web Keys (JWKs)
|
||||||
|
keypairs gen > key.jwk.json 2> pub.jwk.json
|
||||||
|
|
||||||
|
# Generate PEM (or DER) Keys, by extension
|
||||||
|
keypairs gen --key key.pem --pub pub.pem
|
||||||
|
|
||||||
|
# Sign a payload
|
||||||
|
keypairs sign key.jwk.json --exp 1h '{ "sub": "me@example.com" }' > token.jwt 2> sig.jws
|
||||||
|
|
||||||
|
# Verify a signature
|
||||||
|
keypairs verify pub.jwk.json token.jwt
|
||||||
|
```
|
||||||
|
|
||||||
|
Cheat Sheet at <https://webinstall.dev/keypairs>.
|
||||||
|
|
||||||
|
### Install
|
||||||
|
|
||||||
|
**Mac**, **Linux**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -sS https://webinstall.dev/keypairs | bash
|
||||||
|
```
|
||||||
|
|
||||||
|
**Windows 10**:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl.exe -A MS https://webinstall.dev/keypairs | powershell
|
||||||
|
```
|
||||||
|
|
||||||
|
# Keypairs Go Library
|
||||||
|
|
||||||
JSON Web Key (JWK) support and type safety lightly placed over top of Go's `crypto/ecdsa` and `crypto/rsa`
|
JSON Web Key (JWK) support and type safety lightly placed over top of Go's `crypto/ecdsa` and `crypto/rsa`
|
||||||
|
|
||||||
Useful for JWT, JOSE, etc.
|
Useful for JWT, JOSE, etc.
|
||||||
|
|
|
@ -34,7 +34,7 @@ func usage() {
|
||||||
fmt.Println(" verify")
|
fmt.Println(" verify")
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
fmt.Println("Examples:")
|
fmt.Println("Examples:")
|
||||||
fmt.Println(" keypairs gen -o key.jwk.json [--pub <public-key>]")
|
fmt.Println(" keypairs gen --key key.jwk.json [--pub <public-key>]")
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
fmt.Println(" keypairs sign --exp 15m key.jwk.json payload.json")
|
fmt.Println(" keypairs sign --exp 15m key.jwk.json payload.json")
|
||||||
fmt.Println(" keypairs sign --exp 15m key.jwk.json '{ \"sub\": \"xxxx\" }'")
|
fmt.Println(" keypairs sign --exp 15m key.jwk.json '{ \"sub\": \"xxxx\" }'")
|
||||||
|
|
Loading…
Reference in New Issue