Install decrypt OpenSSL under Windows platform

Source: Internet
Author: User
Tags openssl aes

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);
      }
   }
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.