aescbc

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESCBCHMACSHA2

type AESCBCHMACSHA2 struct {
	Alg string
	// contains filtered or unexported fields
}

AESCBCHMACSHA2 implements AES_CBC_HMAC_SHA2 as defined in https://tools.ietf.org/html/rfc7518#section-5.2.2

func NewAES128CBCHMACSHA256

func NewAES128CBCHMACSHA256(key []byte) (*AESCBCHMACSHA2, error)

NewAES128CBCHMACSHA256 returns an implementation of AES_128_CBC_HMAC_SHA_256 (https://tools.ietf.org/html/rfc7518#section-5.2.3)

func (*AESCBCHMACSHA2) Decrypt

func (a *AESCBCHMACSHA2) Decrypt(iv, ciphertext, additionalData, tag []byte) ([]byte, error)

func (*AESCBCHMACSHA2) Encrypt

func (a *AESCBCHMACSHA2) Encrypt(iv, plaintext, additionalData []byte) (EncryptResult, error)

type EncryptResult

type EncryptResult struct {
	Ciphertext, Tag []byte
}

Jump to

Keyboard shortcuts

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