{
 "spec_version": 0,
 "generated": "2026-09-28",
 "source": "https://tnid.info/implementing/test-vectors/",
 "notes": "Hex fields (bits, random, payload, key) are lowercase hex without 0x; uuid is the lowercase UUID form; ms and stored_ms are milliseconds since the Unix epoch. Names map to their 20 name bits. Variant 0 records with stored_ms show timestamp wrap at 2^43. uuid_case_insensitive inputs parse to the given string. left_open inputs may be accepted or rejected.",
 "names": [
  {"name": "a", "bits": "30000"},
  {"name": "0", "bits": "08000"},
  {"name": "ab", "bits": "31c00"},
  {"name": "a1b2", "bits": "308e3"},
  {"name": "post", "bits": "ad319"},
  {"name": "test", "bits": "cab19"},
  {"name": "user", "bits": "d6157"},
  {"name": "zzzz", "bits": "fffff"}
 ],
 "variant_0": [
  {"name": "a", "ms": 0, "random": "0", "string": "a.-----------------", "uuid": "30000000-0000-8000-8000-000000000000"},
  {"name": "user", "ms": 1234567890, "random": "0", "string": "user.--Zmk4cF---------", "uuid": "d6157000-932c-805a-8400-000000000000"},
  {"name": "test", "ms": 1767502656561, "random": "123456789abcde", "string": "test.Br2flcN7HC4OsafnT", "uuid": "cab19337-0ebc-8686-8212-3456789abcde"},
  {"name": "zzzz", "ms": 8796093022207, "random": "1ffffffffffffff", "string": "zzzz.zzzzzzwzzzzzzzzzz", "uuid": "ffffffff-ffff-8fff-8fff-ffffffffffff"},
  {"name": "post", "ms": 9999999999999, "stored_ms": 1203906977791, "random": "154a98ceb1f0ad2", "string": "post.7kbDJzwxJeNnf6kfH", "uuid": "ad319230-9ce5-83ff-8f54-a98ceb1f0ad2"}
 ],
 "variant_1": [
  {"name": "a", "payload": "0", "string": "a.------0----------", "uuid": "30000000-0000-8000-9000-000000000000"},
  {"name": "b", "payload": "1", "string": "b.------0---------0", "uuid": "38000000-0000-8000-9000-000000000001"},
  {"name": "test", "payload": "123456789abcdef0123456789", "string": "test.3YGLT8djCvk3YGLT8", "uuid": "cab19123-4567-889a-9bcd-ef0123456789"},
  {"name": "zzzz", "payload": "fffffffffffffffffffffffff", "string": "zzzz.zzzzzzxzzzzzzzzzz", "uuid": "ffffffff-ffff-8fff-9fff-ffffffffffff"}
 ],
 "round_trips": [
  {"string": "test.x8MRU0xetVa6QZeZR", "uuid": "cab19f49-5dc7-8c1f-9ab9-8261db92a91c", "variant": 1},
  {"string": "user.Br2flcNDfF6LYICnT", "uuid": "d6157337-0ebc-8686-83ab-4075a34cdcde", "variant": 0},
  {"string": "user.BsOdOgguzJorJeVH7", "uuid": "d6157338-6696-86cb-8ebf-534dd4aa0488", "variant": 0},
  {"string": "user.Br2flcPDfF6LYICnT", "uuid": "d6157337-0ebc-8686-a3ab-4075a34cdcde", "variant": 2},
  {"string": "user.Br2flcQDfF6LYICnT", "uuid": "d6157337-0ebc-8686-b3ab-4075a34cdcde", "variant": 3}
 ],
 "uuid_case_insensitive": [
  {"uuid": "D6157337-0EBC-8686-83AB-4075A34CDCDE", "string": "user.Br2flcNDfF6LYICnT"}
 ],
 "reject_strings": [
  {"input": "User.Br2flcNDfF6LYICnT", "reason": "uppercase character in the name."},
  {"input": "users.Br2flcNDfF6LYICnT", "reason": "name longer than 4 characters."},
  {"input": "5.Br2flcNDfF6LYICnT", "reason": "5 is not in the name alphabet."},
  {"input": ".Br2flcNDfF6LYICnT", "reason": "empty name."},
  {"input": "user.Br2flcNDfF6LYICn", "reason": "16 data characters."},
  {"input": "user.Br2flcNDfF6LYICnTx", "reason": "18 data characters."},
  {"input": "user.Br2flcNDfF6LYIC+T", "reason": "+ is not in the data alphabet."},
  {"input": "user.Br2flcNDfF6LY.CnT", "reason": "two dots. The data is 17 characters, but . is not in the data alphabet."},
  {"input": "user.", "reason": "empty data."},
  {"input": " user.Br2flcNDfF6LYICnT", "reason": "whitespace is not part of a TNID string"},
  {"input": "user.Br2flcNDfF6LYICnT\n", "reason": "whitespace is not part of a TNID string"},
  {"input": "usér.Br2flcNDfF6LYICnT", "reason": "é is not in the name alphabet. Counted in code points, the name is 4 characters long."},
  {"input": "user.Br2flcNDfF6LYICnТ", "reason": "the last character is Cyrillic Т (U+0422), not ASCII T."}
 ],
 "reject_uuids": [
  {"input": "d6157337-0ebc-8686-83ab-4075a34cdcd", "reason": "31 hex digits, not 32."},
  {"input": "d6157337-0ebc-8686-83ab-4075a34cdcde0", "reason": "33 hex digits, not 32."},
  {"input": "d6157337-0ebc-4686-83ab-4075a34cdcde", "reason": "UUID version is 4, not 8."},
  {"input": "d6157337-0ebc-9686-83ab-4075a34cdcde", "reason": "UUID version is 9, not 8."},
  {"input": "d6157337-0ebc-8686-c3ab-4075a34cdcde", "reason": "UUID variant bits are 0b11, not 0b10."},
  {"input": "00000000-0000-8000-8000-000000000000", "reason": "the name is all nulls."},
  {"input": "300e0000-0000-8000-8000-000000000000", "reason": "the name bits are a, null, b, null, so a character follows a null."}
 ],
 "left_open": [
  {"input": "d61573370ebc868683ab4075a34cdcde", "note": "32 hex digits without hyphens."},
  {"input": "{d6157337-0ebc-8686-83ab-4075a34cdcde}", "note": "braces."},
  {"input": "urn:uuid:d6157337-0ebc-8686-83ab-4075a34cdcde", "note": "the URN prefix."}
 ],
 "encryption": [
  {"key": "00000000000000000000000000000000", "v0": "a.-----------------", "v1": "a.qjrH3l_XfqYmAVUgO"},
  {"key": "0102030405060708090a0b0c0d0e0f10", "v0": "user.--Zmk4cF---------", "v1": "user.S1PcM9daFtzp1lJM5"},
  {"key": "0102030405060708090a0b0c0d0e0f10", "v0": "user.BsOdOgguzJorJeVH7", "v1": "user.-8hAMlKY0mjrmzQHv"},
  {"key": "2b7e151628aed2a6abf7158809cf4f3c", "v0": "post.7kbDJzwxJeNnf6kfH", "v1": "post.X3Wxwp0wOy4OZp_rP"}
 ]
}
