iTextSharp.text.pdf.BarcodeInter25.GetChecksum C# (CSharp) Метод

GetChecksum() публичный статический Метод

public static GetChecksum ( string text ) : char
text string
Результат char
        public static char GetChecksum(string text) {
            int mul = 3;
            int total = 0;
            for (int k = text.Length - 1; k >= 0; --k) {
                int n = text[k] - '0';
                total += mul * n;
                mul ^= 2;
            }
            return (char)(((10 - (total % 10)) % 10) + '0');
        }