c# - Generate a unique PIN code based on the phone number -


with unique phone number 0241194000, want generate pin code based on phone number , way check or validate pin generated phone number.

example

number  : 0241194000                      lenght(10) pin     : 675436                          lenght(6)     numeric checker : 673aa3738shzxcvder              length    alphanumeric. 

any links or great.

what looking mathematical bijective function (preferably complex one) allows number (x) turned pin, means of said function

f(number) = pin

by having bijective function, can validate pins solving equation in opposite direction.

http://en.wikipedia.org/wiki/bijection

for example:

given function: f(number) = number*2

function generatepin(number)     return number*2 end  function validatepin(pin,number)     return pin == number*2 end 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -