summaryrefslogtreecommitdiffstats
path: root/tests/crypt_checksalt.phpt
blob: b9a64628dec92a08aa576007e1eff703f8bc03ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
Test crypt_checksalt
--FILE--
<?php
$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);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)