joseutil

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyTypeRSA = "RSA"
)

Variables

This section is empty.

Functions

func GenerateJWK

func GenerateJWK(alg, use, id string) (*jwk.Jwk, error)

func Sign

func Sign(privateJwk *jwktype.Jwk, payload []byte) ([]byte, error)

Sign creates a JWS signature for the provided payload using the specified key

func ValidatePrivKey

func ValidatePrivKey(j *jwk.Jwk) error

ValidatePrivKey validates the private key fields of the JWK according to its algorithm.

func ValidatePubKey

func ValidatePubKey(j *jwk.Jwk) error

ValidatePubKey validates the public key fields of the JWK according to its algorithm.

func Verify

func Verify(publicJwk *jwktype.Jwk, signedPayload []byte) ([]byte, error)

Verify checks if a JWS signature is valid using the specified public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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