aesctr

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

aesctr Credits: https://github.com/Xeoncross/go-aesctr-with-hmac

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidHMAC = errors.New("invalid HMAC")

ErrInvalidHMAC for authentication failure

Functions

func Decrypt

func Decrypt(in io.Reader, out io.Writer, keyAes, keyHmac []byte) (err error)

Decrypt the stream and verify HMAC using the given AES-CTR and SHA512-HMAC key Do not trust the out io.Writer contents until the function returns the result of validating the ending HMAC hash.

func Encrypt

func Encrypt(in io.Reader, out io.Writer, keyAes, keyHmac []byte) (err error)

Encrypt the stream using the given AES-CTR and SHA512-HMAC key

Types

This section is empty.

Jump to

Keyboard shortcuts

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