Ejemplo n.º 1
0
 public bool TryLookup(byte[] username, out ScramUserCredential user)
 {
     lock (m_users)
     {
         return(m_users.TryGetValue(new ReadonlyByteArray(username), out user));
     }
 }
Ejemplo n.º 2
0
        public void AddUser(string username, string password, int iterations = 4000, int saltSize = 32, HashMethod hashMethod = HashMethod.Sha256)
        {
            var user = new ScramUserCredential(username, password, iterations, saltSize, hashMethod);

            lock (m_users)
            {
                m_users.Add(user.UserBytes, user);
            }
        }