Changed the type from inputlen from uint8_t to uint32_t  since data can be larger then 255-bytes. (Bill Cox found this bug)