summaryrefslogtreecommitdiffstats
path: root/tests/crypt_checksalt.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/crypt_checksalt.phpt')
-rw-r--r--tests/crypt_checksalt.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/crypt_checksalt.phpt b/tests/crypt_checksalt.phpt
new file mode 100644
index 0000000..4fbd8bf
--- /dev/null
+++ b/tests/crypt_checksalt.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Test crypt_checksalt
+--FILE--
+<?php
+var_dump(crypt_checksalt(crypt_gensalt(XPASS_CRYPT_STD_DES)) === CRYPT_SALT_METHOD_LEGACY);
+var_dump(crypt_checksalt(crypt_gensalt()) === CRYPT_SALT_OK);
+var_dump(crypt_checksalt("!not_a_valid_hash") === CRYPT_SALT_INVALID);
+?>
+--EXPECT--
+bool(true)
+bool(true)
+bool(true)