Recently encountered in the work need to encrypt the data transmission to decrypt, at first. NET with the. NET environment, using the "System.Security.Cryptography" under. NET has no problem at all, but later to interact with Java,android,ios, the result is nothing. After viewing that the three platforms are used by the OpenSSL of the addition and decryption, so it turned out the openssl.net ...
Openssl.net's simple understanding is the encapsulation of a set of C # languages for OpenSSL's dynamic-link library (libeay32.dll,ssleay32.dll) so that it can be in. NET environment in C # language to the string encryption, decryption, signature, verification, etc., detailed functions and algorithms can be consulted OpenSSL
It has been said that in order to complete the cross-platform transmission, to achieve a relatively unified
- Using Openssl.net Prerequisites
-
- Install the OpenSSL tool (Https://www.openssl.org/source) and have a certain understanding of the OpenSSL command line.
- Download Openssl.net source code (https://github.com/openssl-net/openssl-net), there is a very detailed test and call method.
1. Create a new project and refer to Openssl.net with NuGet (64-bit and 32-bit on-demand installation):
2. After successful installation:
3. After building the project, you need to copy the Libeay32.dll and Ssleay32.dll to the bin directory of the project and the ManagedOpenSsl.dll sibling:
4, need to adjust the project build target platform (32 bit is x86,64 bit is x64):
5, to this can write code, probably to browse the next ManagedOpenSsl.dll namespace, detailed can download source view:
Openssl.net using the accompanying notes