keys

package
v0.1.6-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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"`
}

type JWKSets

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

type KeyService

type KeyService struct {
	PrivateKeyBits int
}

func (*KeyService) GenerateKey

func (k *KeyService) GenerateKey() (*rsa.PrivateKey, error)

func (*KeyService) JWKSetsToPublicKey

func (k *KeyService) JWKSetsToPublicKey(jwkSets JWKSets, kid string) (*rsa.PublicKey, error)

func (*KeyService) JWKToPublicKey

func (k *KeyService) JWKToPublicKey(jwk JWK) (*rsa.PublicKey, error)

func (*KeyService) PrivateKeyDecodePEM

func (k *KeyService) PrivateKeyDecodePEM(pemdata []byte) (*rsa.PrivateKey, error)

func (*KeyService) PrivateKeyEncodePEM

func (k *KeyService) PrivateKeyEncodePEM(privateKey *rsa.PrivateKey) ([]byte, error)

func (*KeyService) PublicKeyToJWK

func (k *KeyService) PublicKeyToJWK(pub rsa.PublicKey) (*JWK, error)

Jump to

Keyboard shortcuts

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