please explain more about what package can do

Recommend this page to a friend!

      PHP RSA Encryption  >  All threads  >  please explain more about what...  >  (Un) Subscribe thread alerts  
Subject:please explain more about what...
Summary:please explain more about what package can do
Messages:2
Author:behnamy
Date:2015-06-09 16:04:04
 

  1. please explain more about what...   Reply   Report abuse  
Picture of behnamy behnamy - 2015-06-09 16:04:04
Hi, thanks for your great packages. would you explain more about what this package can do and write more example codes of it's usage?
for example I want to know that can I use this package for encrypting transfered data between client and server side without buying SSL?
for example I want to encrypt the password of login form with public key in javascript and decrypt it in PHP side to retrive the raw password by decrypting and authenticate the user then?

or Can I even encryption the whole page like SSL with this package?

  2. Re: please explain more about what...   Reply   Report abuse  
Picture of Dmitry Mamontov Dmitry Mamontov - 2015-06-10 08:00:12 - In reply to message 1 from behnamy
It takes just installed library openssl.
Each key has a limit on the stored data. Assume key 2048 bytes and can contain 2048 bytes, it priblezitelno 2000 symbols.
Encrypt in LGL better with http://travistidwell.com/jsencrypt/.

Example:
$(function () {
$('#but').click(function(){
var pub = $('#pub').val();
var crypt = new JSEncrypt();
crypt.setPublicKey(pub);
var data = $('#data').val();
$('#out').val(crypt.encrypt(data));
});
});

 
For more information send a message to info at phpclasses dot org.