Bodu.IO.Hashing guides
Recipe-style walk-throughs for Bodu.IO.Hashing, organized by namespace. Each guide on this page is a focused walk-through of one algorithm or family.
Part of the Hashing & Cryptography topic.
If you have not yet installed the package or want the high-level shape of the library, start with the Bodu.IO.Hashing introduction and the getting-started page. The introduction's Choosing a subfamily section covers the structural differences between fingerprints, checksums, and check digits, and how they relate to the cryptographic families.
For the auto-generated API reference, see the Bodu.IO.Hashing namespace page. For keyed or cryptographic hashes (SipHash, Poly1305, Tiger, CubeHash, Merkle trees), see the Bodu.Security.Cryptography hashing guides.
Namespace map
| Namespace | What lives here | Guides |
|---|---|---|
Bodu.IO.Hashing |
Fingerprints - Fnv*, CityHash*, MurmurHash3_32 / MurmurHash3_128, Pearson, Bernstein, BKDR, SDBM, JSHash, Elf64, ApHash, Pjw32, SuperFastHash. Plus the streaming contracts BlockNonCryptographicHashAlgorithm and IResumableHashAlgorithm. |
FNV · CityHash · MurmurHash3 · Pearson · Classic string hashes |
Bodu.IO.Hashing.Checksums |
Polynomial-remainder and twin-accumulator checksums - Crc + CrcStandard + CrcStandards, Fletcher16/32/64, Adler32 / Adler32C / Adler64, plus the CrcLookupTableBuilder / CrcLookupTableCache table machinery. |
CRC · CRC catalogue · Fletcher · Adler · Streaming, async, and resumable hashing |
Bodu.IO.Hashing.CheckDigits |
Every check-digit algorithm - decimal single-character (Luhn, Damm, Verhoeff, Ean8, Ean13, Gtin14, UpcA, Isbn13, AbaRoutingNumber), alphanumeric single-character (Isin, Isbn10, Sedol, Cusip, Iso7064Mod11_2, Code39Mod43, Crockford32), and multi-character (Iban, Lei, Iso7064Mod97_10). Plus the root CheckValueAlgorithm and its abstract bases CheckDigitAlgorithm, AlphanumericCheckDigitAlgorithm, MultiCharCheckDigitAlgorithm. |
Check digits overview · Alphanumeric and encoded check digits |
Bodu.IO.Hashing.Extensions |
One-shot, async, and verify helpers over NonCryptographicHashAlgorithm. |
Streaming, async, and resumable hashing |
BCL note.
XxHash32,XxHash64,XxHash3, andXxHash128ship inSystem.IO.Hashingfrom .NET 6 onwards. Bodu does not duplicate them - use the BCL types directly when you want xxHash.
Guides
Bodu.IO.Hashing - Fingerprints
Using FNV
FNV-1 and FNV-1a at 32 and 64 bits - simple, fast, textbook fingerprint for in-memory hash tables.
Using CityHash
32-, 64-, and 128-bit CityHash - Google's block-oriented fingerprint for in-memory data; buffers its whole input.
Using MurmurHash3
Austin Appleby's MurmurHash3 - MurmurHash3_32 and MurmurHash3_128; seeded with excellent avalanche.
Using Pearson
Pearson's table-driven hash with output widths from 8 to 2048 bits.
Classic string hashes
Bernstein (djb2), BKDR, SDBM, JSHash, Elf64, ApHash, PJW, SuperFastHash.
Bodu.IO.Hashing.Checksums
Using CRC
The Crc engine and CrcStandard; CrcStandards enum; named lookups; custom parameter sets; lookup-table caches; resumable hashing.
CRC catalogue
The full table of named CRC standards from the RevEng catalogue - name, width, class, and enum value.
Using Fletcher
Twin-accumulator checksums in 16, 32, and 64 bits - catches transpositions a simple sum or XOR misses.
Using Adler
Adler-32 (zlib), Adler-32C (power-of-two modulus), Adler-64.
Streaming, async, and resumable hashing
HashingStream, the ComputeHashAsync / VerifyHashAsync / AppendDataAsync extensions, IResumableHashAlgorithm across CRC, FNV, Fletcher, and Adler, and the digest byte-order table.
Bodu.IO.Hashing.CheckDigits
Check digits overview
Luhn, Damm, Verhoeff, EAN, GTIN, UPC, ISIN, ABA routing - single-character validators. Plus IBAN, ISBN, SEDOL, CUSIP, LEI - all in the one Bodu.IO.Hashing.CheckDigits namespace.
Alphanumeric and encoded check digits
Code39Mod43, Crockford32, Gumm, ISO 7064 MOD 11-2 / MOD 97-10, SEDOL, CUSIP, ISIN, LEI, IBAN under the four-level CheckValueAlgorithm hierarchy; the input / output alphabet enums; authoring a scheme; a measured error-class table.
Common lifecycle
Every fingerprint and checksum in this package derives from NonCryptographicHashAlgorithm, so the lifecycle is identical regardless of which one you pick (the check digits work on text through their own CheckValueAlgorithm root):
using Bodu.IO.Hashing;
using Bodu.IO.Hashing.Checksums;
var hash = new Crc(); // or Fletcher32, Adler32, Fnv1a64, CityHash64, …
hash.Append(chunk1);
hash.Append(chunk2);
byte[] partial = hash.GetCurrentHash(); // snapshot, non-destructive
hash.Append(chunk3);
byte[] full = hash.GetCurrentHash();
hash.Reset(); // back to the initial state
Crc, the FNV family (Fnv132 / Fnv164 / Fnv1a32 / Fnv1a64), Fletcher16 / Fletcher32 / Fletcher64, and Adler32 / Adler32C / Adler64 implement IResumableHashAlgorithm - see Streaming, async, and resumable hashing for the pattern across all four families, and HashingStream for checksumming as a side effect of stream I/O.
Where to go next
- Runnable samples - offline sample projects under
samples/IO.Hashing/: the CRC catalogue, checksum families, streaming/resumable digests, check digits, and a custom scheme with contract tests. - Bodu.IO.Hashing introduction - namespaces, headline types, scenarios.
- Bodu.IO.Hashing getting started - install and minimal samples.
- Bodu.Security.Cryptography hashing guide - keyed and cryptographic hashes.
- Bodu.IO.Hashing API reference - namespace overview with key types.
- Hashing & Cryptography guides - the topic map across Bodu.IO.Hashing and Bodu.Security.Cryptography. The complete hashing guide list is this page; the cryptography one is its index.