summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/crypt_checksalt.phpt2
-rw-r--r--tests/crypt_gensalt.phpt18
-rw-r--r--tests/password_compat.phpt2
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/crypt_checksalt.phpt b/tests/crypt_checksalt.phpt
index f34f585..0a0f6ee 100644
--- a/tests/crypt_checksalt.phpt
+++ b/tests/crypt_checksalt.phpt
@@ -3,7 +3,7 @@ Test crypt_checksalt
--FILE--
<?php
// salt with old algo is OK or LEGACY
-$r = crypt_checksalt(crypt_gensalt(XPASS_CRYPT_STD_DES));
+$r = crypt_checksalt(crypt_gensalt(CRYPT_PREFIX_STD_DES));
var_dump($r === CRYPT_SALT_METHOD_LEGACY || $r === CRYPT_SALT_OK);
// salt with default algo is OK
diff --git a/tests/crypt_gensalt.phpt b/tests/crypt_gensalt.phpt
index b838a04..945e520 100644
--- a/tests/crypt_gensalt.phpt
+++ b/tests/crypt_gensalt.phpt
@@ -2,15 +2,15 @@
Test crypt_gensalt
--FILE--
<?php
-var_dump(crypt_gensalt(XPASS_CRYPT_STD_DES));
-var_dump(crypt_gensalt(XPASS_CRYPT_EXT_DES));
-var_dump(crypt_gensalt(XPASS_CRYPT_MD5));
-var_dump(crypt_gensalt(XPASS_CRYPT_BLOWFISH));
-var_dump(crypt_gensalt(XPASS_CRYPT_SHA256));
-var_dump(crypt_gensalt(XPASS_CRYPT_SHA512));
-var_dump(crypt_gensalt(XPASS_CRYPT_SCRYPT));
-var_dump(crypt_gensalt(XPASS_CRYPT_GOST_YESCRYPT));
-var_dump(crypt_gensalt(XPASS_CRYPT_YESCRYPT));
+var_dump(crypt_gensalt(CRYPT_PREFIX_STD_DES));
+var_dump(crypt_gensalt(CRYPT_PREFIX_EXT_DES));
+var_dump(crypt_gensalt(CRYPT_PREFIX_MD5));
+var_dump(crypt_gensalt(CRYPT_PREFIX_BLOWFISH));
+var_dump(crypt_gensalt(CRYPT_PREFIX_SHA256));
+var_dump(crypt_gensalt(CRYPT_PREFIX_SHA512));
+var_dump(crypt_gensalt(CRYPT_PREFIX_SCRYPT));
+var_dump(crypt_gensalt(CRYPT_PREFIX_GOST_YESCRYPT));
+var_dump(crypt_gensalt(CRYPT_PREFIX_YESCRYPT));
?>
--EXPECTF--
diff --git a/tests/password_compat.phpt b/tests/password_compat.phpt
index 3dd6ad2..2571b02 100644
--- a/tests/password_compat.phpt
+++ b/tests/password_compat.phpt
@@ -9,7 +9,7 @@ $h = password_hash($secret, PASSWORD_BCRYPT);
var_dump($h, password_verify($secret, $h), $h===crypt($secret, $h));
/* generate with crypt, check with both */
-$h = crypt($secret, crypt_gensalt(XPASS_CRYPT_BLOWFISH));
+$h = crypt($secret, crypt_gensalt(CRYPT_PREFIX_BLOWFISH));
var_dump($h, password_verify($secret, $h), $h===crypt($secret, $h));
?>
--EXPECTF--