Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'cryptastic.php';
- $salt = 'salt';
- $pass = $_POST['pass'];
- $msg = $_POST['msg'];
- //echo $msg . "<br />";
- $encryption = new cryptastic;
- $key = $encryption->pbkdf2($pass, $salt, 1000, 32) or
- die("Failed to generate secret key.");
- //$encrypted = $encryption->encrypt($msg, $key) or
- // die("Failed to complete encryption.");
- //echo $encrypted . "<br /><br />\n";
- $decrypted = $encryption->decrypt($msg, $key) or
- die("Failed to complete decryption");
- echo $decrypted . "<br /><br />\n";
- ?>
Add Comment
Please, Sign In to add comment