Back

#hashing

3 APIs with this tag

Birthday Paradox API

Birthday-paradox and collision-probability maths as an API, computed locally and deterministically. The probability endpoint computes the chance that at least two of n people share a birthday among d equally likely days, P = 1 − Π(1 − i/d), evaluated in log space for accuracy — the famous result that just 23 people give about a 50.7 % chance, 50 people about 97 % and 70 people about 99.9 %. The people-needed endpoint inverts it: the smallest group size to reach a target probability (23 for 50 %, 57 for 99 %), with the √(2·d·ln(1/(1−p))) approximation. The collision endpoint generalises the birthday bound to any space — pass a number of buckets or a hash size in bits — and returns the collision probability P ≈ 1 − e^(−n²/2d), the rule behind hash collisions and UUID-uniqueness estimates, where a 50 % chance needs roughly 1.177·√d items. Days and buckets default to 365. Everything is computed locally and deterministically, so it is instant and private. Ideal for probability-education, security, cryptography, hashing, data-engineering and statistics app developers, collision-risk and birthday-problem tools, and teaching material. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is the birthday/collision probability; for full distributions use a probability API.

api.oanor.com/birthdayparadox-api

A/B Bucketing API

Deterministic A/B testing and feature-flag assignment — no database, no stored state. The bucket endpoint hashes a key (a user id, session or device) into a stable bucket from 0 to N-1 that never changes for that key, and can decide whether the key is inside a percentage rollout; because the decision is monotonic, raising the percentage only ever adds users, so a gradual ramp-up is sticky and no one flips back out. The variant endpoint assigns one of several weighted variants — a simple control/treatment split or any multivariate test — consistently for the same key, honouring custom weights. Mixing in an experiment name keeps independent experiments independent, and because the same inputs always produce the same answer, your client and server (and any edge function) agree on the assignment without any coordination or lookups. Hashing is FNV-1a with an avalanche mix, giving uniform, stable buckets across languages and machines. It runs entirely locally, so it is instant, deterministic and private. Ideal for feature flags and gradual rollouts, A/B and multivariate experiments, canary releases, holdouts and kill-switches, and consistent UI bucketing across web and mobile. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This assigns experiments deterministically; to test whether a result is statistically significant use a statistics API.

api.oanor.com/abtest-api

Checksum API

Fast non-cryptographic checksums as an API. Compute CRC-32 — the integrity check used by ZIP, gzip, PNG and Ethernet — and Adler-32 — the checksum used by zlib — over UTF-8 text, hex or base64 input, returned in hex and as signed and unsigned 32-bit integers. Ideal for file- and message-integrity verification, cache keys and ETags, change detection and deduplication, where you want a quick fingerprint rather than a secure hash. Pure local computation — no key, no third-party service, instant; send binary via the hex or base64 encoding (up to 4 MB). Live, nothing stored. 4 endpoints. Explicitly NOT for security — for cryptographic digests (MD5, SHA-256, HMAC) use a hashing API instead.

api.oanor.com/checksum-api