Added length type check to HOTP and corresponding test