|
CorrectionsChapter 1, section "Conversion of Integral Types to Byte Arrays", page 24Source code is wrong (looks like I cut-n-pasted from an old version). Also note that the java.nio typeBuffer classes allow for bulk reading and writing ints and longs into a byte array. Chapter 6, section "Small Message Encoding", pages 212-229Note that this entire section has been updated. See HOWTO: Check Digits. Chapter 6, section "Mod 10", page 222This method detects all single-digit errors and all single transposition errors. Incorrect. The Luhn formula does not catch tranposition errors that Chapter 6, section "Mod 11,10 and Mod 17,16", page 227and a hexadecimal version (mod 16,15) is being used Should be mod 17,16. It is used for ISAN check digit. Also, EU blood bags now seem to use Mod11,10 Chapter 6, section "Mod 97", page 228... so the check digit is 98 - 62 = 82. Uhh, should be 98 - 16 = 82 Chapter 6, section "Mod 97", page 229In source code: return (98 - val % 97); This is correct (and how the ISO spec examples work), but the check digits wil range from 2-98, instead of the more expected 0-96. Different encoding algorithms may produce different check digits for the same data, but they will still verify correctly. If this bothers you, substitute: return (98 - val % 97) % 97 Chapter 6, section "Base 85", page 235In the source code, the class name is base84, and should be base85 Reference. Page 380[Verhoelff1969] Verhoeff, J. "Error Dectecting... Two typos! Should be [Verhoeff1969] Verhoeff, J. "Error Detecting...
|