Rain: Precision Hashing with Primes
Fast, secure hashing is critical for data integrity, yet balancing speed and quality is tough. I addressed this with Rain, a hash function using 64-bit primes and XSR operations to deliver rapid 256-bit and 128-bit hashes, passing SMHasher3 tests. In the web’s digital circuitry, Rain is a precision-engineered chip, pulsing with the rhythm of primes to ensure data flows securely.
By using primes with strong avalanche properties, Rain ensures each bit change cascades across the output, enhanced by a WebAssembly bridge for consistent JavaScript-C++ outputs.
static inline void mixA(uint64_t* s) {
uint64_t a = s[0], b = s[1], c = s[2], d = s[3];
a *= P; a = ROTR64(a, 23); a *= Q;
b ^= a; b *= R; b = ROTR64(b, 29); b *= S;
c *= T; c = ROTR64(c, 31); c *= U;
d ^= c; d *= V; d = ROTR64(d, 37); d *= W;
s[0] = a; s[1] = b; s[2] = c; s[3] = d;
}
This mixA
function uses primes to trigger bit avalanches, ensuring robust hashing. Rain’s design excels in both speed and quality.

Building Rain was like designing a microchip, each prime a carefully placed transistor. At DOSAYGO, we pursue precision, crafting tools that balance form and function. Rain is a digital cascade, ensuring data integrity with the grace of a well-tuned machine.