validation_AL_NID.c (1792B)
1 /* 2 This file is part of Anastasis 3 Copyright (C) 2026 Anastasis SARL 4 5 Anastasis is free software; you can redistribute it and/or modify it under the 6 terms of the GNU General Public License as published by the Free Software 7 Foundation; either version 3, or (at your option) any later version. 8 9 Anastasis is distributed in the hope that it will be useful, but WITHOUT ANY 10 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License along with 14 Anastasis; see the file COPYING.GPL. If not, see <http://www.gnu.org/licenses/> 15 */ 16 /** 17 * @file reducer/validation_AL_NID.c 18 * @brief Validation for Albanian national identity numbers 19 * @author Christian Grothoff 20 */ 21 #include "platform.h" 22 #include <gnunet/gnunet_util_lib.h> 23 #include <string.h> 24 #include <stdbool.h> 25 26 27 /** 28 * Function to validate an Albanian national identity number (NIPT/NID). 29 * 30 * NOT YET IMPLEMENTED: the algorithm computing the trailing check letter has 31 * not been confirmed against an authoritative specification, and guessing it 32 * would reject valid numbers. Until it is, this deliberately accepts any 33 * input and logs that no check was performed. The 34 * "validation-regex" in contrib/redux.al.json still applies. 35 * 36 * @param nid_number identity number to validate (input) 37 * @return true, always, as no check is implemented yet 38 */ 39 bool 40 AL_NID_check (const char *nid_number); 41 42 /* declaration to fix compiler warning */ 43 bool 44 AL_NID_check (const char *nid_number) 45 { 46 (void) nid_number; 47 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 48 "Albanian identity numbers are not checked: AL_NID_check is not implemented\n"); 49 return true; 50 }