Token: How to generate token which will valid up to 5 minutes

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
i am looking for a sample which generate a token number which valid for 5 minutes. share a code for this as example.

here i got a sample code which generate a token which valid upto 24 hours but its code and logic not clear to me that how it generate a number which only valid for 24 hours. so please see the code and tell me how this code works.

public static string GenerateToken()
{
int month = DateTime.Now.Month;
int day = DateTime.Now.Day;
string token = ((day * 100 + month) * 700 + day * 13).ToString();
return token;
}


Please tell me how the above code generate a number which exist as a valid token for next 24 hours? please discuss the above code how it works?

thanks

thanks

Continue reading...
 
Back
Top