https://github.com/mochabyte0x/chacha20
ChaCha20 encryption implemented in C/C++ (Header Only)
https://github.com/mochabyte0x/chacha20
c chacha20 cpp encryption-algorithms
Last synced: 21 days ago
JSON representation
ChaCha20 encryption implemented in C/C++ (Header Only)
- Host: GitHub
- URL: https://github.com/mochabyte0x/chacha20
- Owner: mochabyte0x
- License: mit
- Created: 2025-09-02T20:59:27.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-09-02T21:59:20.000Z (about 1 month ago)
- Last Synced: 2025-09-02T23:10:34.028Z (about 1 month ago)
- Topics: c, chacha20, cpp, encryption-algorithms
- Language: C
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ChaCha20
Usage:
```C
// Initialize context
struct chacha20_context ctx;// Define your KEY (32-Byte)
unsigned char CHACHA20_KEY[32] = { };// Define your Nonce (12-Byte)
unsigned char CHACHA20_NONCE[12] = { };// After those intializations, you can encrypt / decrypt your buffer using the same function
chacha20_init_context(&ctx, CHACHA20_KEY, CHACHA20_NONCE, 0);
chacha20_xor(&ctx, pBuffer, dwSize); // Encrypt or Decrypt
SecureZeroMemory(&ctx, sizeof(ctx)); // Optional```