in reply to Need a wait to generate a 4 digit "PIN" number
Have you thought about using CRC?
You could concat the strings and take the CRC. CRC gives you a 32 bit number. You could just take the last 4 digits of that. The CRC on the same given string is always the same, so your last four digits would also be the same.
Note: There is a small bias when reading just the last 4 digits of a 32 bit number you get a small bias in the spread. In other words, it's not a well distributed psuedo random set of 4 digits. But it's generally 'random enough' for anything but cryptography.
|
|---|