private void AesButton_Click(object sender, EventArgs e) { var aesCryptoTool = new AESCryptoTool(); var newIV = aesCryptoTool.GenerateNewIVString(); GenerateIvTextBox.Text = newIV; }
public void EncryptionAndDecryptionPasswordTest(string message, string password) { TestContext.WriteLine($"Params| message = {message}, password = {password}"); var aes = new AESCryptoTool(); var originalMessage = message; var encrypted = aes.EncryptRun(message, password); var decrypted = aes.DecryptRun(encrypted, password); TestContext.WriteLine($"Encrypted message = {encrypted}"); Assert.AreNotEqual(encrypted, decrypted); Assert.AreEqual(originalMessage, decrypted); }