Minor fixes

Hi. I was testing your class and found two minor issues, please see the attached merge request. One has been reported before and it is harmless as the current timestamp returned by a date object already converts to a 8 digit HEX string. But as you are checking anyway, it is nice to use the correct mask size (8 characters).
The second is an off by one comparison. I simply change the location of the increment, alternatively you could also use a >= when comparing the upper limit of the increment value.
BTW I have a PHP version of this class if you are interested, not sure if it is ok to post it here or not.