1 Download OpenSSL installation on the OpenSSL website, this machine is 64-bit win 8.1 system
Http://slproweb.com/products/Win32OpenSSL.html
Download: Win64 OpenSSL V0.9.8ZB
Visual C + + redistributables (x64)
2 Downloads ActivePerl 5.10.1.1007 (the latest version or lower version is also available):
: http://www.activestate.com/activeperl/downloads/
Installation sequence, first install ActivePerl, then visualc++ environment, finally installed OpenSSL
3 decrypting a file with a command
My Opessl is installed in the default path of C drive,
You can use the decryption command.
Of course, you can also configure environment variables.
4 You can also use C # code to execute commands
Using System;
Using System.Diagnostics;
Namespace Apptest
{
public class Opensslcmd
{
public void Demo ()
{
Process P = new process ();
p.StartInfo.FileName = "cmd.exe";
P.startinfo.useshellexecute = false;
P.startinfo.redirectstandardinput = true;
P.startinfo.redirectstandardoutput = true;
P.startinfo.redirectstandarderror = true;
P.startinfo.createnowindow = true;
P.start ();
p.standardinput.writeline (@ "C:");
P.standardinput.writeline (@ "CD C:\OpenSSL\bin");
P.standardinput.writeline (@ "OpenSSL aes-128-cbc-d-salt-in roam_20140808114918.cdr.aes_sale-out ROAM_ 20140808114918.cdr.out-pass pass:1234567890654321 ");
P.standardinput.writeline ("net share > C://1.txt");
p.standardinput.writeline ("exit");
String s = p.standardoutput.readtoend ();
Console.WriteLine (s);
}
}
}