/// <summary> /// Encrypted code, together with the password, is decrypted /// to plain text through the decryption algorithm. /// </summary> /// <param name="encryptedText"></param> /// <param name="password"></param> /// <returns></returns> private string DecryptText(string encryptedText, string password) { try { if (string.IsNullOrEmpty(encryptedText)) { return(null); } var decryptionProcessor = new DecryptionProcessor(encryptedText, password); var plainText = decryptionProcessor.Decrypt(); return(plainText); } catch (Exception ex) { return(ex.Message); } }
private void btnDecrypt_Click(object sender, EventArgs e) { DecryptionProcessor.LocateClientPrivateKeyAndDecrypt(ClientRsaPrivateKeyLocation, ServerRsaPrivateKeyLocation); DecryptionProcessor.DecryptAESKeys(AESFilesLocation, ClientRsaPrivateKeyLocation); DecryptionProcessor.DecryptLockedFiles(AESFilesLocation, LockedDataLocation); }