Documentation ¶
Overview ¶
Package jwe encrypts/decrypts Agent messages to/from JSON Web Encryption compact serialization format
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encrypter ¶
type Encrypter struct { }
func NewEncrypter ¶
func NewEncrypter() *Encrypter
NewEncrypter is a factory to return a structure that implements the Transformer interface
func (*Encrypter) Construct ¶
Construct takes data in data, encrypts it using PBES2 (RFC 2898) with HMAC SHA-512 as the PRF and AES Key Wrap (RFC 3394) using 256-bit keys for the encryption scheme. The data is then transformed into a JSON Web Encryption (JWE) object and serializes it using the compact serialization format to string that is returned as bytes. PBES2 uses Password-Based Key Derivation Function 2 (PBKDF2) with a hard-coded 3000 rounds (iterations)
func (*Encrypter) Deconstruct ¶
Deconstruct takes in a JSON Web Encryption (JWE) object in the compact serialization format as bytes, decrypts it, and returns it that data as bytes