summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-09-13 11:31:59 +0200
committerRemi Collet <remi@php.net>2024-09-13 11:31:59 +0200
commit6ebefa0cbe885cd65bdf678c6e85d8b76db03e28 (patch)
tree5dd147e7d6a77140d8845ca16b697220c0db3179
parent6c4e58ba64e3e7fd203a5e38247c98de920da612 (diff)
refresh stub (using 8.4 and compat flag)
-rw-r--r--tests/crypt_checksalt.phpt11
-rw-r--r--xpass.stub.php5
-rw-r--r--xpass_arginfo.h4
3 files changed, 14 insertions, 6 deletions
diff --git a/tests/crypt_checksalt.phpt b/tests/crypt_checksalt.phpt
index b9a6462..f34f585 100644
--- a/tests/crypt_checksalt.phpt
+++ b/tests/crypt_checksalt.phpt
@@ -2,10 +2,17 @@
Test crypt_checksalt
--FILE--
<?php
+// salt with old algo is OK or LEGACY
$r = crypt_checksalt(crypt_gensalt(XPASS_CRYPT_STD_DES));
var_dump($r === CRYPT_SALT_METHOD_LEGACY || $r === CRYPT_SALT_OK);
-var_dump(crypt_checksalt(crypt_gensalt()) === CRYPT_SALT_OK);
-var_dump(crypt_checksalt("!not_a_valid_hash") === CRYPT_SALT_INVALID);
+
+// salt with default algo is OK
+$r = crypt_checksalt(crypt_gensalt());
+var_dump($r === CRYPT_SALT_OK);
+
+// bad salt is INVALID
+$r = crypt_checksalt("!not_a_valid_hash");
+var_dump($r === CRYPT_SALT_INVALID);
?>
--EXPECT--
bool(true)
diff --git a/xpass.stub.php b/xpass.stub.php
index d8f43d1..4cb0d67 100644
--- a/xpass.stub.php
+++ b/xpass.stub.php
@@ -1,6 +1,9 @@
<?php
-/** @generate-class-entries */
+/**
+ * @generate-class-entries
+ * @generate-legacy-arginfo 80000
+ */
/* use XPASS prefix to avoid conflicts with standard constants */
diff --git a/xpass_arginfo.h b/xpass_arginfo.h
index b730bc0..87ad78f 100644
--- a/xpass_arginfo.h
+++ b/xpass_arginfo.h
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
- * Stub hash: db002b549531b275130c17883ff9810fb13017b1 */
+ * Stub hash: 09c1d047a579afe870fadd302bd2e34a5d06c370 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_crypt_gensalt, 0, 0, IS_STRING, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, salt, IS_STRING, 1, "null")
@@ -13,12 +13,10 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_crypt_checksalt, 0, 1, IS_LONG,
ZEND_ARG_TYPE_INFO(0, salt, IS_STRING, 0)
ZEND_END_ARG_INFO()
-
ZEND_FUNCTION(crypt_gensalt);
ZEND_FUNCTION(crypt_preferred_method);
ZEND_FUNCTION(crypt_checksalt);
-
static const zend_function_entry ext_functions[] = {
ZEND_FE(crypt_gensalt, arginfo_crypt_gensalt)
ZEND_FE(crypt_preferred_method, arginfo_crypt_preferred_method)