jwe

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const PBKDF2Iterations = 500001

PBKDF2Iterations is the default number of iterations for PBKDF2, 100k iterations. Nist recommends at least 10k, 1Passsword uses 100k.

View Source
const PBKDF2SaltSize = 16

PBKDF2SaltSize is the default size of the salt for PBKDF2, 128-bit salt.

Variables

This section is empty.

Functions

func FromKey

func FromKey(key string) (value.Transformer, error)

FromKey returns an encryption transformer instance according to the given key format.

func Transformer

func Transformer(algorithm KeyAlgorithm, key string) (value.Transformer, error)

Transformer returns a JWE encryption value transformer instance.

func TransformerKey

func TransformerKey(algorithm KeyAlgorithm, key string) string

TransformerKey assemble a transformer key.

Types

type KeyAlgorithm

type KeyAlgorithm string
var (
	AES128_KW          KeyAlgorithm = "a128kw"
	AES192_KW          KeyAlgorithm = "a192kw"
	AES256_KW          KeyAlgorithm = "a256kw"
	PBES2_HS256_A128KW KeyAlgorithm = "pbes2-hs256-a128kw"
	PBES2_HS384_A192KW KeyAlgorithm = "pbes2-hs384-a192kw"
	PBES2_HS512_A256KW KeyAlgorithm = "pbes2-hs512-a256kw"
)

Jump to

Keyboard shortcuts

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