Created
February 4, 2010 15:19
-
-
Save treffynnon/294724 to your computer and use it in GitHub Desktop.
Wrapper for handling SHA1 encrypted sessions in ADODB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!defined('ADODB_SESSION')) die(); | |
include_once ADODB_SESSION . '/crypt.inc.php'; | |
class ADODB_Encrypt_SHA1 { | |
function write($data, $key) { | |
$sha1crypt =& new SHA1Crypt(); | |
return $sha1crypt->encrypt($data, $key); | |
} | |
function read($data, $key) { | |
$sha1crypt =& new SHA1Crypt(); | |
return $sha1crypt->decrypt($data, $key); | |
} | |
} | |
return 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment