<?php

require_once 'include/sqAES.php';
require_once 'include/JCryption.php';
$postBefore = print_r($_POST, true);
JCryption::decrypt();
header('Content-type: text/plain');
echo "Original POST\n======================\n";
print_r($postBefore);
echo "jCryption example form\n======================\n";
print_r($_POST);
Exemplo n.º 2
0
 public function crypt()
 {
     $jc = new JCryption(BASEPATH . 'plugins/jcryption/key/rsa_1024_pub.pem', BASEPATH . 'plugins/jcryption/key/rsa_1024_priv.pem');
     $jc->go();
     header('Content-type: text/plain');
     print_r($_POST);
 }
<?php

/* example jCryption entry point - will handle handshake, getPublicKey,
 * decrypttest or a dump of posted form variables.
 * Key files specified below should be stored outside the web tree
 * but for the example they are not.
 *
 * To generate keys:
 *
 * openssl genrsa -out rsa_1024_priv.pem 1024
 * openssl rsa -pubout -in rsa_1024_priv.pem -out rsa_1024_pub.pem
 */
require_once 'include/sqAES.php';
require_once 'include/JCryption.php';
$jc = new JCryption('rsa_1024_pub.pem', 'rsa_1024_priv.pem');
$jc->go();
header('Content-type: text/plain');
print_r($_POST);