jwxtest

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTempFile

func CreateTempFile(template string) (*os.File, func(), error)

func DecryptJweFile

func DecryptJweFile(ctx context.Context, file string, alg jwa.KeyEncryptionAlgorithm, jwkfile string) ([]byte, error)

func DumpFile

func DumpFile(t *testing.T, file string)

func EncryptJweFile

func EncryptJweFile(ctx context.Context, payload []byte, keyalg jwa.KeyEncryptionAlgorithm, keyfile string, contentalg jwa.ContentEncryptionAlgorithm, compressalg jwa.CompressionAlgorithm) (string, func(), error)

func GenerateEcdsaJwk

func GenerateEcdsaJwk() (jwk.Key, error)

func GenerateEcdsaKey

func GenerateEcdsaKey(alg jwa.EllipticCurveAlgorithm) (*ecdsa.PrivateKey, error)

func GenerateEcdsaPublicJwk

func GenerateEcdsaPublicJwk() (jwk.Key, error)

func GenerateEd25519Jwk added in v1.0.7

func GenerateEd25519Jwk() (jwk.Key, error)

func GenerateEd25519Key added in v1.0.7

func GenerateEd25519Key() (ed25519.PrivateKey, error)

func GenerateRsaJwk

func GenerateRsaJwk() (jwk.Key, error)

func GenerateRsaKey

func GenerateRsaKey() (*rsa.PrivateKey, error)

func GenerateRsaPublicJwk

func GenerateRsaPublicJwk() (jwk.Key, error)

func GenerateSymmetricJwk

func GenerateSymmetricJwk() (jwk.Key, error)

func GenerateSymmetricKey

func GenerateSymmetricKey() []byte

func GenerateX25519Jwk added in v1.0.7

func GenerateX25519Jwk() (jwk.Key, error)

func GenerateX25519Key added in v1.0.7

func GenerateX25519Key() (x25519.PrivateKey, error)

func ParseJwkFile

func ParseJwkFile(_ context.Context, file string) (jwk.Key, error)

func ReadFile

func ReadFile(file string) ([]byte, error)

func SignJwsFile added in v1.1.3

func SignJwsFile(ctx context.Context, payload []byte, alg jwa.SignatureAlgorithm, keyfile string) (string, func(), error)

func VerifyJwsFile added in v1.1.3

func VerifyJwsFile(ctx context.Context, file string, alg jwa.SignatureAlgorithm, jwkfile string) ([]byte, error)

func WriteFile

func WriteFile(template string, src io.Reader) (string, func(), error)

func WriteJSONFile

func WriteJSONFile(template string, v interface{}) (string, func(), error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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