Version: v1.2.25 Latest Latest

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

Go to latest
Published: May 23, 2022 License: MIT Imports: 21 Imported by: 0




This section is empty.


This section is empty.


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)


This section is empty.

Source Files

Jump to

Keyboard shortcuts

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