I need to generate a 4 digit PIN number. I want to use the a combo of three bits of information. Say I have three bits of data for a user. Data1, Data2 and Data3. These may be any length. I want to use these three bits of data to generate a 4 digit number. Each time I pass these bits of data through the algorithm, it must produce the same 4 digit number.
I do not want to save the PIN number. I want to generate it dynamically each time.
For example, a user gives me these three bits of data. I then generate a pin number and give that to them. Next time they give me the same three bits AND the pin number. Now I can generate the PIN number and compare what they gave me for a PIN number. I can now verify if they are the same user.
I cannot manage to work out how to generate the 4 digit number from bits of data. For the sake of this question, lets say the data bits are:
data1=iamgreat
data2=my@email.com
data3=ilikepie
I would appreciate any help y'all can offer.