Feng Forum

Other Topics => General Discussion => : aaghsekhelnawala March 06, 2019, 12:26:49 PM

: Digest Algorithm with timeout!!!
: aaghsekhelnawala March 06, 2019, 12:26:49 PM
I'm looking to create an MD5 like hash, which includes a built in time out.

If I store $enc = md5('password'), then any time later someone types their password in - I then md5('password') and grant access based upon the two MD5's being the same. That's how the normal one works.

Well - what I need is to have $enc = t_md5('password',date), then sometime later when they type the password in, it only generates the same hash IF the expiry_date has not passed.

In effect, making the one way hash have a lifespan beyond which it no longer matches.
You can assume that the date/time of the machine running both the original and subsequent t_md5's is secure.
Akinator (https://akinator.ooo/)https://xender.vip/ (https://xender.vip/) https://appsync.biz/speed-test/ (https://appsync.biz/speed-test/)