Skip to content

LordOS — a free, fast and secure GNU/Linux distribution based on Debian, with its own desktop environment: display server and Wayland compositor in C, a React UI engine on QuickJS, and private native apps.

3.6 KB
Raw Blame
/* KAT: Nayuki's qrcodegen 1.8 (the standard's reference; segno adds 8 extra padding bits when
 * the data ends exactly on a byte). BIG: segno 1.6.6, at full capacity (no padding), and
 * verified identical against qrcodegen. */
typedef struct { const char *data; int ecc, ver, mask; const char *rows[57]; } QrKat;
static const QrKat KAT[] = {
  { "HELLO WORLD", 2, 1, 0, {"111111101100001111111", "100000101001001000001", "101110101001101011101", "101110101000001011101", "101110101010001011101", "100000100010001000001", "111111101010101111111", "000000001000000000000", "011010110000101011111", "010000001111000010001", "001101110110001011000", "011011010011010101110", "100010101011101110101", "000000001101001000101", "111111101010000101100", "100000100101101101000", "101110101010001111111", "101110100101010100010", "101110101001011101001", "100000101011110001011", "111111100001011100001"} },
  { "01234567", 1, 1, 0, {"111111100011101111111", "100000101110001000001", "101110100110001011101", "101110100101101011101", "101110101101101011101", "100000100001001000001", "111111101010101111111", "000000000000000000000", "101010100010100010010", "110100001011010100010", "000110111011011101110", "110011010101110110010", "001001110111011100001", "000000001010001000010", "111111100000100010001", "100000100010001001011", "101110101110101011101", "101110100101010101110", "101110101101011100101", "100000100001110111000", "111111101001011100101"} },
  { "LordOS 2026", 0, 1, 7, {"111111100101101111111", "100000101101001000001", "101110101100101011101", "101110100101001011101", "101110101000101011101", "100000101001101000001", "111111101010101111111", "000000001111100000000", "110100110110001110110", "111110000110010010111", "101001100000110001001", "010001010001011101011", "100010110110110011010", "000000001101000101000", "111111101000000011010", "100000100001110010001", "101110100111000000010", "101110101010011001011", "101110100010100110101", "100000101101100000000", "111111101100111101110"} },
  { "https://example.org/a?b=c", 3, 4, 1, {"111111100101001100011110101111111", "100000101100001110100010001000001", "101110101111101100011100101011101", "101110101100000000010101001011101", "101110101011010000111011001011101", "100000101001110001000011001000001", "111111101010101010101010101111111", "000000000000111001011011100000000", "001001111010000000110000010111110", "000001000100101001110001011100011", "100111110000010001101111100111001", "011011011101100010000011010101010", "111001101100011110101111101011001", "011110010110000011111111111000001", "000011110001011001101001111010101", "110111010110100011000010110000010", "110010101010001001111010011100110", "001111011111001101111101011100100", "001101110111100100011001000001100", "111010011100000111010001001111001", "001011110111010110011001000100000", "000011000101010101101000000100111", "111100100011110001110011011011101", "001001001010111100011010000001011", "110100110101000110010111111111000", "000000001010101000000100100011001", "111111101010000101100000101010001", "100000101010010110111101100010011", "101110100101000001001101111111000", "101110100101100101111101110111110", "101110101111010100010100000011011", "100000100100011100110000100001100", "111111100000111110100110111011101"} },
};
typedef struct { int ver, ecc, mask; int len; unsigned long long hash; } QrBig;
static const QrBig BIG[] = {
  { 7, 1, 3, 122, 0x669475f7b5f925dfULL },
  { 10, 2, 5, 151, 0x1cf295d86a307f57ULL },
  { 25, 0, 6, 1273, 0x098937c089333cbaULL },
  { 40, 3, 1, 1273, 0xd2fb9f1d87d1254aULL },
  { 40, 0, 4, 2953, 0x98772d7e05ca23a1ULL },
  { 15, 3, 0, 220, 0x7b40bf6df2ac3177ULL },
};