Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
chacha20
✓ gitlab.com/yawning/chacha20.git
Encrypt and decrypt data using the ChaCha20 stream cipher.
package main
import (
"fmt"
"gitlab.com/yawning/chacha20.git"
)
func main() {
key := [32]byte{}
nonce := [12]byte{}
cipher, _ := chacha20.New(key[:], nonce[:])
plaintext := []byte("Hello, World!")
ciphertext := make([]byte, len(plaintext))
cipher.XORKeyStream(ciphertext, plaintext)
fmt.Println(ciphertext)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20230427033715-7877545b1b37latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.