content_crypt

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cipher added in v1.0.6

type Cipher interface {
	Decrypt([]byte, []byte, []byte, []byte, []byte) ([]byte, error)
	KeySize() int
}

type Generic

type Generic struct {
	// contains filtered or unexported fields
}

Generic encrypts a message by applying all the necessary modifications to the keys and the contents

func NewGeneric added in v1.0.6

func NewGeneric(alg jwa.ContentEncryptionAlgorithm) (*Generic, error)

func (Generic) Algorithm

func (c Generic) Algorithm() jwa.ContentEncryptionAlgorithm

func (Generic) Decrypt

func (c Generic) Decrypt(cek, iv, ciphertext, tag, aad []byte) ([]byte, error)

func (Generic) Encrypt

func (c Generic) Encrypt(cek, plaintext, aad []byte) ([]byte, []byte, []byte, error)

func (Generic) KeySize

func (c Generic) KeySize() int

Jump to

Keyboard shortcuts

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