acbc

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package acbc provides the AES_CBC_HMAC_SHA2 content encryption algorithm.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New128CBC_HS256

func New128CBC_HS256() enc.Algorithm

func New192CBC_HS384

func New192CBC_HS384() enc.Algorithm

func New256CBC_HS512

func New256CBC_HS512() enc.Algorithm

Types

type Algorithm

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

func (*Algorithm) Decrypt

func (alg *Algorithm) Decrypt(cek, iv, aad, ciphertext, authTag []byte) (plaintext []byte, err error)

func (*Algorithm) Encrypt

func (alg *Algorithm) Encrypt(cek, iv, aad, plaintext []byte) (ciphertext, authTag []byte, err error)

func (*Algorithm) GenerateCEK added in v0.0.3

func (alg *Algorithm) GenerateCEK() ([]byte, error)

func (*Algorithm) GenerateIV added in v0.0.3

func (alg *Algorithm) GenerateIV() ([]byte, error)

Jump to

Keyboard shortcuts

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