Beispiel #1
0
        public static String  Login(User user)
        {
            Certification certifier = Certification.GetInstance();
            string        value     = Secret.DESEncrypt(user.Id + separator + Time.GetTimeStamp(DateTime.Now));

            if (Certification.Certifier.ContainsKey(user.Id))
            {
                Certification.Certifier.Remove(user.Id);
            }
            Certification.Certifier.Add(user.Id, user);
            return(value);
        }
Beispiel #2
0
 public static Certification GetInstance()
 {
     if (instance == null)
     {
         lock (_lock)
         {
             if (instance == null)
             {
                 instance = new Certification();
             }
         }
     }
     return(instance);
 }