Move password calculation into general library
authorJoey Schulze <joey@infodrom.org>
Thu, 25 Feb 2010 21:09:10 +0000 (22:09 +0100)
committerJoey Schulze <joey@infodrom.org>
Thu, 25 Feb 2010 21:09:10 +0000 (22:09 +0100)
lib/general.php
lib/login.php

index 278501e..6216e34 100644 (file)
@@ -1,5 +1,10 @@
 <?php
 
+function passwd($login,$pass)
+{
+  return md5(md5($pass).$login);
+}
+
 function check_session()
 {
   if (!empty($_POST['login']) && !empty($_POST['passwd'])) {
index 35e6160..70ef0e4 100644 (file)
@@ -1,10 +1,5 @@
 <?php
 
-function passwd($login,$pass)
-{
-  return md5(md5($pass).$login);
-}
-
 function check_passwd()
 {
   if (empty($_POST['login']) || empty($_POST['passwd']))