jose

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() bool

func DecryptJwe

func DecryptJwe(ctx context.Context, t *testing.T, cfile, kfile string) ([]byte, error)

func EncryptJwe

func EncryptJwe(ctx context.Context, t *testing.T, payload []byte, alg string, keyfile string, enc string, compact bool) (string, func(), error)

EncryptJwe creates an encrypted JWE message and returns its filename and a cleanup function. The caller is responsible for calling the cleanup function and make sure all resources are released

func ExecutablePath

func ExecutablePath() string

func FmtJwe

func FmtJwe(ctx context.Context, t *testing.T, data []byte) ([]byte, error)

func GenerateJwk

func GenerateJwk(ctx context.Context, t *testing.T, template string) (string, func(), error)

GenerateJwk creates a new key using the jose tool, and returns its filename and a cleanup function. The caller is responsible for calling the cleanup function and make sure all resources are released

func RunJoseCommand

func RunJoseCommand(ctx context.Context, t *testing.T, args []string, outw, errw io.Writer) error

func SetExecutable

func SetExecutable(path string)

func SignJws added in v1.1.3

func SignJws(ctx context.Context, t *testing.T, payload []byte, keyfile string, compact bool) (string, func(), error)

SignJws signs a message and returns its filename and a cleanup function. The caller is responsible for calling the cleanup function and make sure all resources are released

func VerifyJws added in v1.1.3

func VerifyJws(ctx context.Context, t *testing.T, cfile, kfile string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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