public void Process(UsernamePasswordCombo startingUsernamePasswordCombo) { var sha1 = SHA1.Create(); sha1.ComputeHash(Encoding.ASCII.GetBytes(startingUsernamePasswordCombo.Password)); string passwordHolder = Encoding.ASCII.GetString(sha1.Hash); string usernameHolder = startingUsernamePasswordCombo.Username; ProcessedCombo = new UsernamePasswordCombo(usernameHolder, passwordHolder); }
private Dictionary <string, string> _usernamePasswordDictionary = new Dictionary <string, string>(); // likely stored in a database - would be cool project to start a database server and store this here. TODO for another time public void AddCredential(UsernamePasswordCombo usernamePasswordCombo, ICredentialProcessor credentialProcessor) { credentialProcessor.Process(usernamePasswordCombo); _usernamePasswordDictionary.Add(credentialProcessor.ProcessedCombo.Username, credentialProcessor.ProcessedCombo.Password); }