Beispiel #1
0
 public Recognizer()
 {
     Id  = Guid.NewGuid().ToString();
     Key = HashingService.GenerateSHA256(Convert.FromBase64String(Guid.NewGuid().ToString().Replace("-", "")), Convert.FromBase64String(ApplicationDbContext._hashSalt));
     LastActivityDateTime = DateTime.UtcNow.AddHours(8);
     LastActivityAction   = "IDLE";
 }
Beispiel #2
0
        public MemberCapture()
        {
            Id = Guid.NewGuid().ToString();
            string key = Guid.NewGuid().ToString();

            Code   = HashingService.GenerateSHA256(Convert.FromBase64String(key.Replace("-", "")), Convert.FromBase64String(ApplicationDbContext._hashSalt)).Replace('+', 'x');
            Type   = 0;
            Status = 1;
        }
Beispiel #3
0
 public AppLoginSession(string key, HttpRequest request)
 {
     Id          = Guid.NewGuid().ToString();
     Status      = 0;
     DateCreated = DateTime.UtcNow.AddHours(8);
     Key         = HashingService.GenerateSHA256(Convert.FromBase64String(key.Replace("-", "")), Convert.FromBase64String(ApplicationDbContext._hashSalt));
     IpAddress   = request.Host.Value;
     UserAgent   = request.Headers["User-Agent"].ToString();
 }