From 920007a3b3d6c557acf1dcd449e967a5ad98596f Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Wed, 13 Jan 2010 23:56:51 +0000 Subject: [PATCH] Use any string for key git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1292 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- adminer/include/xxtea.inc.php | 2 ++ 1 file changed, 2 insertions(+) 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];