diff --git a/support/schema/aur-schema.sql b/support/schema/aur-schema.sql
index 250d405..f12c57d 100644
--- a/support/schema/aur-schema.sql
+++ b/support/schema/aur-schema.sql
@@ -25,8 +25,8 @@ CREATE TABLE Users (
 	Suspended TINYINT UNSIGNED NOT NULL DEFAULT 0,
 	Username CHAR(32) NOT NULL,
 	Email CHAR(64) NOT NULL,
-	Passwd CHAR(32) NOT NULL,
-	Salt CHAR(32) NOT NULL DEFAULT '',
+	Passwd CHAR(128) NOT NULL,
+	Salt CHAR(32),
 	ResetKey CHAR(32) NOT NULL DEFAULT '',
 	RealName CHAR(64) NOT NULL DEFAULT '',
 	LangPreference CHAR(5) NOT NULL DEFAULT 'en',
diff --git a/web/README b/web/README
index 041b521..f3c1f60 100644
--- a/web/README
+++ b/web/README
@@ -44,6 +44,8 @@ Setup on Arch Linux:
 
    If those php extensions are separate packages on your system, install
    them.
+   The hash extension is usually statically compiled into php. If it is
+   provided as an extension, add it too.
 
    AUR requires PEAR and the File_Find module.
    Installing PEAR will vary depending on the system and may already
diff --git a/web/lib/aur.inc b/web/lib/aur.inc
index 965a6bd..8f8d469 100644
--- a/web/lib/aur.inc
+++ b/web/lib/aur.inc
@@ -463,8 +463,8 @@ function generate_salt()
 
 function salted_hash($passwd, $salt)
 {
-	if (strlen($salt) != 32) {
-		trigger_error('Salt does not look like an md5 hash', E_USER_WARNING);
-	}
-	return md5($salt . $passwd);
+	if (!isset($salt))
+		return md5($passwd); /* Legacy */
+		
+	return hash('sha512', pack("H*" , $salt) . "##" . pack("H*" , md5($passwd)));
 }
