Turkish Identity Number Validator

A small C# validator that checks Turkish identity-number check digits directly on a long, without regex, substring extraction or character-array materialization.

This component answers one narrow question: does the number satisfy the published arithmetic check-digit rules? Its core API operates on a long; digits are extracted with division and modulo, and the final two checks are computed numerically. Regex, substring slicing and character-array parsing are not part of the validation path.

The word “valid” must not be stretched beyond that contract. Passing the checksum does not prove that a number was issued to a real person, nor that the person presenting it owns the identifier. The library does not query a population registry or any government endpoint. Arithmetic pre-validation and official identity verification remain separate operations.

That makes the code useful as an inexpensive first gate before a more authoritative process, while keeping data-handling policy outside the utility. Systems processing real identity data still have their own privacy, authorization, logging and minimization obligations.

Context article: Identity Numbers from a Digital Forensics Perspective Repository: GitHub Zenodo record: Zenodo DOI: DOI

QR code for this page