From: jakubvrana Date: Wed, 13 Jan 2010 23:56:51 +0000 (+0000) Subject: Use any string for key X-Git-Tag: v3.0.0~256 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=920007a3b3d6c557acf1dcd449e967a5ad98596f;p=adminer.git Use any string for key git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1292 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/adminer/include/xxtea.inc.php b/adminer/include/xxtea.inc.php index 476b937b..9e24c7a8 100644 --- a/adminer/include/xxtea.inc.php +++ b/adminer/include/xxtea.inc.php @@ -46,6 +46,7 @@ function encrypt_string($str, $key) { if ($str == "") { return ""; } + $key = array_values(unpack("V*", pack("H*", md5($key)))); $v = str2long($str, true); $n = count($v) - 1; $z = $v[$n]; @@ -78,6 +79,7 @@ function decrypt_string($str, $key) { if ($str == "") { return ""; } + $key = array_values(unpack("V*", pack("H*", md5($key)))); $v = str2long($str, false); $n = count($v) - 1; $z = $v[$n];