summaryrefslogtreecommitdiffstats
path: root/lib/debug.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-28 23:15:08 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-28 23:15:08 +0000
commitebcc2e6bbeac03e4a5e4960abe14a3dd3122ea1c (patch)
tree94a1a096b8721326b28205b488d18d01cdc01333 /lib/debug.lib.php
parentfb36d75acedcb959aaae7cd51dc93ed67109ed06 (diff)
downloadampache-ebcc2e6bbeac03e4a5e4960abe14a3dd3122ea1c.tar.gz
ampache-ebcc2e6bbeac03e4a5e4960abe14a3dd3122ea1c.tar.bz2
ampache-ebcc2e6bbeac03e4a5e4960abe14a3dd3122ea1c.zip
add a check for the sha256() hash algo
Diffstat (limited to 'lib/debug.lib.php')
-rw-r--r--lib/debug.lib.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/debug.lib.php b/lib/debug.lib.php
index 3459609c..1c0f9270 100644
--- a/lib/debug.lib.php
+++ b/lib/debug.lib.php
@@ -76,10 +76,18 @@ function check_database_inserted($dbh,$db_name) {
*/
function check_php_ver($level=0) {
- if (strcmp('5.1.0',phpversion()) > 0) {
+ if (strcmp('5.1.2',phpversion()) > 0) {
return false;
}
+ // Make sure that they have the sha256() algo installed
+ if (!function_exists('hash_algos')) { return false; }
+ $algos = hash_algos();
+
+ if (!in_array('sha256',$algos)) {
+ return false;
+ }
+
return true;
} // check_php_ver