diff options
author | Remi Collet <remi@remirepo.net> | 2024-09-13 10:13:12 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2024-09-13 10:13:12 +0200 |
commit | ef4627a6a618b460cbbea109e3e0522c891be72c (patch) | |
tree | 466a4678a4c18d4a636f3375f4b72e3045cde437 /tests/crypt_checksalt.phpt | |
parent | 5bca3985ce597abd2db703e0944160a8f73dd84a (diff) |
More bindings (function missing in php)
- add crypt_gensalt(?string $salt = null, int $count = 0): ?string {}
- add crypt_preferred_method(): ?string {}
- add crypt_checksalt(string $salt): int {}
and bump version to 1.1.0-dev (new functions)
Diffstat (limited to 'tests/crypt_checksalt.phpt')
-rw-r--r-- | tests/crypt_checksalt.phpt | 12 |
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) |