RFC Errata
RFC 4226, "HOTP: An HMAC-Based One-Time Password Algorithm", December 2005
Source of RFC: IETF - NON WORKING GROUPArea Assignment: sec
Errata ID: 2409
Status: Held for Document Update
Type: Editorial
Publication Format(s) : TEXT
Reported By: Alfred Hoenes
Date Reported: 2006-01-18
Held for Document Update by: Sean Turner
Date Held: 2010-07-30
Section C says:
In Appendix C, the source code on page 30 (lower half) and
page 31 contains improperly indented lines.
The following three line groups should be indented by 6 more character
positions to make them conformant to RFC style 'nice' format:
- on page 30:
String result = null;
int digits = addChecksum ? (codeDigits + 1) : codeDigits;
- on page 30:
if ( (0<=truncationOffset) &&
(truncationOffset<(hash.length-4)) ) {
offset = truncationOffset;
}
- on page 31:
if (addChecksum) {
otp = (otp * 10) + calcChecksum(otp, codeDigits);
}
result = Integer.toString(otp);
while (result.length() < digits) {
result = "0" + result;
}
return result;
It should say:
[see above]
Notes:
[ further formatting (indentation) issues ]
