crypto

package
v4.5.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(bytes []byte, encryptionKey []byte) ([]byte, error)

Decrypt decrypts the given bytes with the given encryption key.

func Encrypt

func Encrypt(bytes []byte, encryptionKey []byte) ([]byte, error)

Encrypt encrypts the given bytes with the given encryption key.

func EncryptThenMAC

func EncryptThenMAC(bytes []byte, encryptionKey []byte, authenticationKey []byte) ([]byte, error)

EncryptThenMAC encrypts the given bytes with the given encryption key and appends an HMAC of the encrypted bytes with the given authentication key.

func MACThenDecrypt

func MACThenDecrypt(bytes []byte, encryptionKey []byte, authenticationKey []byte) ([]byte, error)

MACThenDecrypt authenticates the HMAC of the given bytes with the given authentication key and then decrypts the encrypted bytes with the given encryption key.

Types

This section is empty.

Jump to

Keyboard shortcuts

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