Моя проблема в том, что я хочу вычислить время шифрования в тройном DES. Я поместил элемент управления таймером в форму, как показано ниже, но проблема в том, что он продолжает считать даже шифрование, заканчивается. Как я могу остановить управление таймером, когда он считает время шифрования?

timer1.Enabled = true;
timer1.Start();
//3DES ENCRYPTION
MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider();
UTF8Encoding utf8 = new UTF8Encoding();
TripleDESCryptoServiceProvider tDES = new TripleDESCryptoServiceProvider();
tDES.Key = md5.ComputeHash(utf8.GetBytes(textBox1.Text));
//to decrypt the data we must use these two property
tDES.Mode = CipherMode.ECB;
tDES.Padding = PaddingMode.PKCS7;
//this is interface to encrypt our data
ICryptoTransform trans = tDES.CreateEncryptor();
encrypted = trans.TransformFinalBlock(utf8.GetBytes(textBox2.Text), 0, utf8.GetBytes(textBox2.Text).Length);
textBox3.Text = BitConverter.ToString(encrypted);