Author Topic: Digest Algorithm with timeout  (Read 1517 times)


  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Digest Algorithm with timeout
« on: February 15, 2018, 07:30:50 AM »
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.

We are using this as a one shot password system.



  • Newbie
  • *
  • Posts: 7
  • on ap standa
    • View Profile
    • standa
Re: Digest Algorithm with timeout
« Reply #1 on: May 31, 2018, 12:04:56 PM »
I think that simply could not depart your website before suggesting that I extremely loved the usual info an individual supply on your visitors? Is going to be again frequently to check up on new posts:
Keep it up the good work. Your article is really looked nice and great because in this way we can learn a lot of things in our life