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
Post a Comment