public static LamportScheme GetLamportScheme(User user) { lock (lamportSchemesLock) { return(LamportSchemes.FirstOrDefault(a => a.User == user)); } }
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); }