Documentation ¶
Index ¶
Constants ¶
View Source
const NonceSize = chacha20poly1305.NonceSize
NonceSize is the size of nonce used by EncryptBytes
Variables ¶
This section is empty.
Functions ¶
func CreatePublicKey ¶
CreatePublicKey generates a public key give a secret key sk
func DecryptBytes ¶
DecryptBytes takes an encrypted packet and returns (packet id, plaintext)
func EncryptBytes ¶
EncryptBytes creates an encrypted packet and consumes the plaintext storage
func RandomBytes ¶
RandomBytes return a []byte of n size with random content
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.