Back to blog

Using PKs C# to PHP

October 24, 2011 - Posted in Cryptography , Programming Posted by:

So lately I’ve been seeing more and more C# application talking to the web, web interaction and applications is something that can be beneficial to both the end user and the developer making a┬áplethora of things simpler and streamlined. However while talking two and from you application one needs to make sure the information is secure at all times.

There are several methods to doing this, and one way is using public, private key-pair cryptography. In the example below I’ve shown a PHP script that is able to talk to a C# application using an openssl public, private key-pair.

In this post I’ve included the source to everything in a .rar file listed for download at the bottom.

Openssl Class

Web usage example

Using the above example in conjunction with the C# application you can demo how this would work. Download the attached file to get a copy of all .php files as well as a full C# application.

PHP to C# Example (394)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">