PHP Classes

File: demo1.php

Recommend this page to a friend!
  Classes of Grigori Kochanov   gksEncrypt   demo1.php   Download  
File: demo1.php
Role: Example script
Content type: text/plain
Description: generate keys
Class: gksEncrypt
Encrypt and decrypt data asymmetrically
Author: By
Last change:
Date: 16 years ago
Size: 452 bytes
 

Contents

Class file image Download
<?php
include('gksException.class.php');
include(
'encrypt.class.php');

try {
   
$passwords = gksEncrypt::generateKeys(512);
}catch (
gksException $E){
    echo
$E->getLogMessage();
    exit;
}

?>
<title>Generating RSA public/private keypair</title>
<h4>Public</h4>
<pre style="border: 1px solid black;width: 700px;"><?=$passwords['public']?></pre>
<h4>Private</h4>
<pre style="border: 1px solid black;width: 700px;"><?=$passwords['private']?></pre>