crypto

package
v1.16.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRandBytes

func CreateRandBytes(size uint32) ([]byte, error)

CreateRandBytes returns a cryptographically secure slice of random bytes with a given size

func DecryptBytes

func DecryptBytes(data, key []byte) ([]byte, error)

DecryptBytes takes a byte slice of encrypted data and an encryption key and returns a decrypted byte slice of data. The key must be an AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256

func EncryptBytes

func EncryptBytes(data, key []byte) ([]byte, error)

EncryptBytes takes a byte slice of raw data and an encryption key and returns an encrypted byte slice of data. The key must be an AES key, either 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256

Types

This section is empty.

Jump to

Keyboard shortcuts

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