Exemple #1
0
 private void Encrypt()
 {
     try
     {
         if (Validate(true))
         {
             var ciphertext = DES.Encrypt(
                 PlainText.FromHexStringToBitArray(),
                 Key.FromHexStringToBitArray());
             CipherText = ciphertext.ToHexString();
         }
     }
     catch (Exception e)
     {
         ShowMessage(string.Format("Error: {0}", e));
     }
 }