protected override bool AfterSelectType(Type selectedType) { CryptographicKeyWizard keyManager = new CryptographicKeyWizard(new SymmetricAlgorithmKeyCreator(selectedType)); DialogResult keyResult = keyManager.ShowDialog(); keySettings = keyManager.KeySettings; return(keyResult == DialogResult.OK); }
protected override bool AfterSelectType(Type selectedType) { if (selectedType.IsSubclassOf(typeof(KeyedHashAlgorithm))) { CreatedElementType = typeof(KeyedHashAlgorithmProviderData); CryptographicKeyWizard keyManager = new CryptographicKeyWizard(new KeyedHashAlgorithmKeyCreator(selectedType)); DialogResult keyResult = keyManager.ShowDialog(); keySettings = keyManager.KeySettings; return(keyResult == DialogResult.OK); } else { CreatedElementType = typeof(HashAlgorithmProviderData); return(true); } }