keys

package
v0.1.7-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePEM

func DecodePEM(pemdata []byte) (*rsa.PrivateKey, error)

func EncodePEM

func EncodePEM(privateKey *rsa.PrivateKey) ([]byte, error)

func GenerateKey

func GenerateKey(privateKeyBits int) (*rsa.PrivateKey, error)

Types

type JWK

type JWK struct {
	E   string `json:"e"`
	N   string `json:"n"`
	Kid string `json:"kid"`
	Kty string `json:"kty"`
	Alg string `json:"alg"`
	Use string `json:"use"`
}

func PublicKeyToJWK

func PublicKeyToJWK(publicKey *rsa.PublicKey) (*JWK, error)

type JWKSets

type JWKSets struct {
	Keys []JWK `json:"keys"`
}

Jump to

Keyboard shortcuts

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