// CreateRandBytes returns a cryptographically secure slice of random bytes with a given size func CreateRandBytes(size uint32) ([]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 func EncryptBytes(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 DecryptBytes(data, key []byte) ([]byte, error) { … }