jwt

command
v12.2.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Generate RSA

$ openssl genrsa -des3 -out private_rsa.pem 2048
b, err := ioutil.ReadFile("./private_rsa.pem")
if err != nil {
    panic(err)
}
key := jwt.MustParseRSAPrivateKey(b, []byte("pass"))

OR

import "crypto/rand"
import "crypto/rsa"

key, err := rsa.GenerateKey(rand.Reader, 2048)

Generate Ed25519

$ openssl genpkey -algorithm Ed25519 -out private_ed25519.pem
$ openssl req -x509 -key private_ed25519.pem -out cert_ed25519.pem -days 365

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL