Author Topic: Digest Algorithm with timeout!!!  (Read 2235 times)


  • Freshman
  • *
  • Posts: 18
    • View Profile
Digest Algorithm with timeout!!!
« on: 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.
« Last Edit: March 07, 2019, 04:11:33 PM by aaghsekhelnawala »