protected override void BeginProcessing() { // Perform some initialization. if (!this.SkipDuplicatePasswordTest.IsPresent) { this.duplicatePasswordDictionary = new Dictionary <byte[], StringCollection>(PasswordDictionaryInitialCapacity, HashEqualityComparer.GetInstance()); } this.result = new PasswordQualityTestResult(); }
protected override void BeginProcessing() { // Test the optional file path in advance to throw an early error. this.ResolveFilePath(this.WeakPasswordHashesFile); this.ResolveFilePath(this.WeakPasswordsFile); if (this.ShouldTestWeakPasswords || !this.SkipDuplicatePasswordTest.IsPresent) { // We need to cache NT hashes of all accounts for the Duplicate and Weak Password Tests. this.hashToAccountMap = new Dictionary <byte[], SortedSet <string> >(PasswordDictionaryInitialCapacity, HashEqualityComparer.GetInstance()); } // Initialize the test results. this.result = new PasswordQualityTestResult(); }
protected override void BeginProcessing() { // Test the optional file path in advance to throw an early error. this.ResolveFilePath(this.WeakPasswordHashesFile); this.ResolveFilePath(this.WeakPasswordsFile); // Open the sorted weak password hashes file, as we will be searching it on-the-fly. string sortedHashesFile = this.ResolveFilePath(this.WeakPasswordHashesSortedFile); if (sortedHashesFile != null) { this.sortedHashFileSearcher = new SortedFileSearcher(sortedHashesFile); } if (this.ShouldTestWeakPasswordsInMemory || !this.SkipDuplicatePasswordTest.IsPresent) { // We need to cache NT hashes of all accounts for the Duplicate and Weak Password Tests. this.hashToAccountMap = new Dictionary <byte[], SortedSet <string> >(PasswordDictionaryInitialCapacity, HashEqualityComparer.GetInstance()); } // Initialize the test results. this.result = new PasswordQualityTestResult(); }