Something that never stops bothering me is this bizarre construction in HOTP (RFC 4226):
int offset = hmac_result[19] & 0xf;
int bin_code = (hmac_result[offset] & 0x7f) << 24
| (hmac_result[offset+1] & 0xff) << 16
| (hmac_result[offset+2] & 0xff) << 8
| (hmac_result[offset+3] & 0xff);
@rq Same. A colleague was implementing it at work recently and we both found it sightly weird.
QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.
@rq Also the whole offset business is weird.