Exemple #1
0
 public static LamportScheme GetLamportScheme(User user)
 {
     lock (lamportSchemesLock)
     {
         return(LamportSchemes.FirstOrDefault(a => a.User == user));
     }
 }
Exemple #2
0
        public static LamportScheme InitLamportScheme(User user, SksClientType clientType)
        {
            lock (lamportSchemesLock)
            {
                if (LamportSchemes.Any(a => a.User == user))
                {
                    return(null);
                }
            }

            var newLamportScheme = new LamportScheme(user);

            lock (akep2sLock)
            {
                LamportSchemes.Add(newLamportScheme);
            }

            return(newLamportScheme);
        }