Skip to content
Snippets Groups Projects
Commit 3a8fe689 authored by Peter Rotich's avatar Peter Rotich
Browse files

Remove temp. password

parent b633ce6c
Branches
Tags
No related merge requests found
...@@ -149,28 +149,6 @@ class Crypto { ...@@ -149,28 +149,6 @@ class Crypto {
return $cryptos; return $cryptos;
} }
function test($count=1) {
$input = 'PASSWORD$$';
$mkey = md5('siri');
$skey = 'testing';
$cryptos = self::cryptos();
for($i=0; $i<$count; $i++) {
foreach($cryptos as $cid => $crypto) {
if(call_user_func(array($crypto, 'exists'))) {
$ciphertext = Crypto::encrypt($input, $mkey, $skey, $cid);
echo sprintf("\n%s: [%s] => [%s] => [%s]\n",
get_class($crypto),
$input,
$ciphertext,
Crypto::decrypt($ciphertext, $mkey, $skey));
} else
echo sprintf("\n%s: (unsupported)\n", get_clasi($crypto));
}
}
}
function hash($string, $key) { function hash($string, $key) {
$hash = new Crypt_Hash('sha512'); $hash = new Crypt_Hash('sha512');
$hash->setKey($key); $hash->setKey($key);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment