Esempio n. 1
0
        public static (string data, DateTime maxDate) GetDataAndMaxDate(string token)
        {
            string _decryptoToken = SecurityOptions.DecryptionStringFromBase64(token);
            int    _spaceIndex    = _decryptoToken.IndexOf(' ');

            return(
                data : _decryptoToken.Substring(_spaceIndex + 1),
                maxDate : new DateTime(Convert.ToInt64(_decryptoToken.Substring(0, _spaceIndex))));
        }
Esempio n. 2
0
 public static string GetToken(string data, DateTime maxDate)
 {
     return(SecurityOptions.EncryptionStringToBase64(maxDate.Ticks + " " + data));
 }