Documentation
¶
Overview ¶
Package chacha is a layer to the package golang.org/x/crypto/chacha20poly1305 allowing to easily encrypt/decrypt data or files
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuffSize int = 2048
BuffSize is the size of the buffer used when reading from file it is set to 2048 bytes (2kb) by default
Functions ¶
func DecryptChaCha20 ¶
DecryptChaCha20 decrypts ct (cipher text) using the key and the nonce return the cipher text or an error
func DecryptFile ¶
DecryptFile take : input/output file, key and nonce in hex then decrypt the file and store result in the output file takes care to change the nonce every time the buffer length is reached
func EncryptChaCha20 ¶
EncryptChaCha20 encrypts pt (plain text) using the key and the nonce return the cipher text or an error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.