std1.0.0-beta-7 SafeC docs

std :: crypto::chacha20

Function std::chacha20_xor

#include <std/crypto/chacha20.h> source · definition

void chacha20_xor(
    []const unsigned char key,
    []const unsigned char nonce,
    unsigned int counter,
    []unsigned char data,
)

XORs the ChaCha20 keystream for (key, nonce), starting at block 'counter', into data[0..len) — encryption and decryption are the same.