Skip to content

Instantly share code, notes, and snippets.

View BlobTheKat's full-sized avatar
🔥
Working on a game

BlobTheKat BlobTheKat

🔥
Working on a game
View GitHub Profile
@BlobTheKat
BlobTheKat / a.h
Last active March 10, 2026 11:21
a.h - C11 Atomics & threads complement library
/**
* Atomics & threads complement library
* Matthew Reiner, 2026
* Available under the GPL 3.0 license
* Targeting: Windows, Linux, *BSD, MacOS
* Implements the following:
* - Wait/Notify functionality for simple types up to 64 bit
* - Arbitrary condition wait
* - Thread management
* - Relax, yield & sleep
@BlobTheKat
BlobTheKat / chacha20poly1305blake2s.c
Last active March 4, 2026 22:53
Lean Chacha20 + Poly1305 + Blake2s implementation
/**
* Relatively fast and low-level ChaCha20, Poly1305 and Blake2s implementation
* Matthew Reiner, 2026
* Available under the GPL 3.0 license
* Fuzz-tested on over 2.5 billion unique inputs for each algorithm, to match libsodium's implementation 1:1
* Tests performed with clang -O3 and included UB-sanitizer and address-sanitizer
*/
#include <stdint.h>
#include <stddef.h>