Fix digestLength range check.