mirror of
https://github.com/moodle/moodle.git
synced 2025-06-03 14:46:35 +02:00
32 lines
376 B
PHP
32 lines
376 B
PHP
<?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;
|
|
?>
|