keys

package
v0.0.0-...-c53e812 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileLocation = "file://"
	URLLocation  = "url://"
)

Variables

This section is empty.

Functions

func LoadJSONWebKey

func LoadJSONWebKey(json []byte, pub bool) (*jose.JSONWebKey, error)

func LoadPrivateKey

func LoadPrivateKey(data []byte) (interface{}, error)

LoadPrivateKey loads a private key from PEM/DER/JWK-encoded data.

func LoadPublicKey

func LoadPublicKey(data []byte) (interface{}, error)

LoadPublicKey loads a public key from PEM/DER/JWK-encoded data.

func LoadPublicKeyFromJWK

func LoadPublicKeyFromJWK(data []byte) (*jose.JSONWebKey, error)

LoadPublicKeyFromJWK loads a public key from JWK-encoded data.

Types

type Config

type Config struct {
	PrivateKey          interface{}
	VerificationKeyList []*jose.JSONWebKey
}

func LoadKeys

func LoadKeys(privateKeyPath, publicKeyLocation string) (*Config, error)

Jump to

Keyboard shortcuts

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