- (when (>= start end)
- (setf (md5-state-buffer-index state) (+ buffer-index amount))
- (return-from update-md5-state state)))
- (fill-block-ub8 block buffer 0)
- (update-md5-block regs block))
+ (let ((new-index (mod (+ buffer-index amount) 64)))
+ (when (zerop new-index)
+ (fill-block-ub8 block buffer 0)
+ (update-md5-block regs block))
+ (when (>= start end)
+ (setf (md5-state-buffer-index state) new-index)
+ (incf (md5-state-amount state) length)
+ (return-from update-md5-state state)))))