From c4fdb3a0d3636161bd4340e8d1186dfb10edb56f Mon Sep 17 00:00:00 2001 From: Emmanuel Di Pretoro Date: Fri, 17 Jul 2026 08:55:10 +0200 Subject: [PATCH] Adding a description of the algorithm used in Noid.pm --- noid.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/noid.py b/noid.py index 893887d..df4433e 100644 --- a/noid.py +++ b/noid.py @@ -170,6 +170,18 @@ class Minter(Persistent): return s def _checkchar(self, id): + # 1. Return undef if id is not set + # 2. init lastchar to last char of the id, and remove that char from id + # 3. init pos to 1 + # 4. init sum to 0 + # 5. declare c + # 6. for each character of the id + # - get the ordinal value of the character + # - increment sum with the pos * the index value of the char in legalstring + # - increment pos + # 7. init checkchar to the value of xdig[sum % alphacount] + # 8. return the concat of id and checkchar is lastchar equal to '+' or checkchar + # 9. return None pass