in reply to Re: perl / math: integer obfu
in thread perl / math: integer obfu

The problem with using MD5 in this case is that MD5 is a one-way function. That is to say that it is easy to calculate the MD5 value of a given input, but it is hard to obtain the original input given the MD5 value.

However, if you have a user input a value, you can store the MD5 value. Then, to validate that the user enters the same value next time, you calculate the MD5 value of the new input and check it against what was stored originally. This scheme is used to validate passowrds in every Unix system that I know (though MD5 isn't always the algorithm used). Also,

Yes, the obfu is important here
Are you hoping to implement "security through obscurity"? Some would liken that to locking a safe with a piece of tape. While it keeps the casual observer from figuring it out, someone who is determined enough will break it.

thor