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.

Source Files