summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Ferrara <ircmaxell@gmail.com>2013-01-14 11:46:54 -0500
committerAnthony Ferrara <ircmaxell@gmail.com>2013-01-14 11:46:54 -0500
commit41ae60a802c5e8dddc31905ebc5de069c5d9e2f9 (patch)
treea12392c98babef901d82207ea5b241dbdabddbe8
parent2a7b6355d27c65f7e0de1fbbc0016b5b6cd8226b (diff)
downloadpassword_compat-41ae60a802c5e8dddc31905ebc5de069c5d9e2f9.zip
password_compat-41ae60a802c5e8dddc31905ebc5de069c5d9e2f9.tar.gz
password_compat-41ae60a802c5e8dddc31905ebc5de069c5d9e2f9.tar.bz2
Remove version checks, add version-test.php
-rw-r--r--composer.json5
-rw-r--r--lib/password.php6
-rw-r--r--version-test.php8
3 files changed, 9 insertions, 10 deletions
diff --git a/composer.json b/composer.json
index 07797a1..0f9f7ad 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
{
"name": "ircmaxell/password-compat",
"description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash",
- "version": "1.0.0-beta1",
+ "version": "1.0.0",
"keywords": ["password", "hashing"],
"homepage": "https://github.com/ircmaxell/password_compat",
"license": "MIT",
@@ -12,9 +12,6 @@
"homepage": "http://blog.ircmaxell.com"
}
],
- "require": {
- "php": ">= 5.3.7"
- },
"autoload": {
"files": ["lib/password.php"]
}
diff --git a/lib/password.php b/lib/password.php
index eaf1e2d..d3e95cb 100644
--- a/lib/password.php
+++ b/lib/password.php
@@ -7,12 +7,6 @@
* @copyright 2012 The Authors
*/
-if (version_compare(PHP_VERSION, '5.3.7', '<')) {
- trigger_error("The Password Compatibility Library requires PHP >= 5.3.7", E_USER_WARNING);
- // Prevent defining the functions
- return;
-}
-
if (!defined('PASSWORD_BCRYPT')) {
define('PASSWORD_BCRYPT', 1);
diff --git a/version-test.php b/version-test.php
new file mode 100644
index 0000000..f527e30
--- /dev/null
+++ b/version-test.php
@@ -0,0 +1,8 @@
+<?php
+
+$hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';
+$test = crypt("password", $hash);
+$pass = $test == $hash;
+
+echo "Test for functionality of compat library: " . ($pass ? "Pass" : "Fail");
+echo "\n"; \ No newline at end of file