/php-src/ext/pdo_pgsql/tests/ |
H A D | gh12423.phpt | 10 die('skip no password'); 20 $password = $config['ENV']['PDOTEST_PASS'] ?? null; 25 if (!$password) { 27 $password = $match[1] ?? ''; 30 $dsn = str_replace("password={$password}", '', $dsn); 43 …$db = new PDO("{$dsn} user={$user} password={$password}", null, null, [PDO::ATTR_ERRMODE => PDO::E… 57 echo "dsn with correct password / correct user / incorrect password".PHP_EOL; 59 …$db = new PDO("{$dsn} password={$password}", $user, 'fuga', [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXC… 67 …$db = new PDO("{$dsn} user={$user} password={$password}", 'hoge', 'fuga', [PDO::ATTR_ERRMODE => PD… 77 dsn with credentials / no user / no password [all …]
|
/php-src/ext/pdo_odbc/tests/ |
H A D | basic_connection.phpt | 20 $password = getenv('PDO_ODBC_TEST_PASS'); 22 $dsn = str_replace(";uid={$user};pwd={$password}", '', $dsnWithCredentials); 24 echo "dsn without credentials / correct user / correct password\n"; 33 echo "dsn with credentials / no user / no password\n"; 42 echo "dsn with correct user / incorrect user / correct password\n"; 51 echo "dsn with correct password / correct user / incorrect password\n"; 70 dsn without credentials / correct user / correct password 73 dsn with credentials / no user / no password 76 dsn with correct user / incorrect user / correct password 79 dsn with correct password / correct user / incorrect password [all …]
|
/php-src/ext/sodium/tests/ |
H A D | php_password_hash_argon2i.phpt | 27 $password = random_bytes(32); 28 echo "Using password: "; 29 var_dump(base64_encode($password)); 30 $hash = password_hash($password, 'argon2i', $opts); 32 var_dump(sodium_crypto_pwhash_str_verify($hash, $password)); 35 $password[0] = chr(ord($password[0]) ^ 1); 36 var_dump(sodium_crypto_pwhash_str_verify($hash, $password)); 42 Using password: string(44) "%s" 46 Using password: string(44) "%s" 50 Using password: string(44) "%s" [all …]
|
H A D | php_password_hash_argon2id.phpt | 27 $password = random_bytes(32); 28 echo "Using password: "; 29 var_dump(base64_encode($password)); 30 $hash = password_hash($password, 'argon2id', $opts); 32 var_dump(sodium_crypto_pwhash_str_verify($hash, $password)); 35 $password[0] = chr(ord($password[0]) ^ 1); 36 var_dump(sodium_crypto_pwhash_str_verify($hash, $password)); 42 Using password: string(44) "%s" 46 Using password: string(44) "%s" 50 Using password: string(44) "%s" [all …]
|
H A D | php_password_verify.phpt | 36 $password = random_bytes(32); 37 echo "Using password: "; 38 var_dump(base64_encode($password)); 39 $hash = sodium_crypto_pwhash_str($password, $ops, $mem); 41 var_dump(password_verify($password, $hash)); 44 $password[0] = chr(ord($password[0]) ^ 1); 45 var_dump(password_verify($password, $hash)); 51 Using password: string(44) "%s" 55 Using password: string(44) "%s" 59 Using password: string(44) "%s" [all …]
|
/php-src/ext/openssl/tests/ |
H A D | openssl_decrypt_basic.phpt | 9 $password = "openssl"; 16 $encrypted = openssl_encrypt($data, $method, $password, 0, $iv); 17 $output = openssl_decrypt($encrypted, $method, $password, 0, $iv); 19 $encrypted = openssl_encrypt($data, $method, $password, OPENSSL_RAW_DATA, $iv); 20 $output = openssl_decrypt($encrypted, $method, $password, OPENSSL_RAW_DATA, $iv); 24 $encrypted = openssl_encrypt($padded_data, $method, $password, OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDIN… 25 $output = openssl_decrypt($encrypted, $method, $password, OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING, $i… 28 $output2 = openssl_decrypt($encrypted, $method, $password, OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING, $… 35 $encrypted = openssl_encrypt($data, "bf-ecb", $password, OPENSSL_DONT_ZERO_PAD_KEY); 36 $output = openssl_decrypt($encrypted, "bf-ecb", $password, OPENSSL_DONT_ZERO_PAD_KEY); [all …]
|
H A D | openssl_pbkdf2_basic.phpt | 10 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 1))); 11 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 2))); 12 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 4096))); 16 var_dump(bin2hex(openssl_pbkdf2('password', 'salt', 20, 16777216)));
|
H A D | openssl_decrypt_error.phpt | 9 $password = "openssl"; 13 $encrypted = openssl_encrypt($data, $method, $password); 15 var_dump(openssl_encrypt($data, $method, $password, 0, $iv)); 17 var_dump(openssl_decrypt($encrypted, $wrong, $password)); 18 var_dump(openssl_decrypt($wrong, $method, $password)); 19 var_dump(openssl_decrypt($wrong, $wrong, $password));
|
H A D | bug73833.phpt | 10 foreach($passwords as $password) { 13 if (openssl_pkey_export($key, $privatePEM, $password, $conf) === false) { 18 if (openssl_pkey_get_private($privatePEM, $password) === false) {
|
H A D | bug74022_2.phpt | 2 Bug #74022 PHP Fast CGI crashes when reading from a pfx file with valid password, multiple extra ce… 7 function test($p12_contents, $password) { 8 openssl_pkcs12_read($p12_contents, $cert_data, $password);
|
H A D | openssl_encrypt_error.phpt | 9 $password = "openssl"; 16 var_dump(openssl_encrypt($data, $wrong, $password)); 19 var_dump(openssl_encrypt($data, $method, $password, OPENSSL_DONT_ZERO_PAD_KEY, $iv));
|
/php-src/ext/odbc/tests/ |
H A D | odbc_connect_001.phpt | 21 echo "dsn without credentials / correct user / correct password\n"; 26 echo "dsn with correct user / incorrect user / correct password\n"; 31 echo "dsn with correct password / correct user / incorrect password\n"; 41 echo "dsn with correct credentials / null user / null password\n"; 46 echo "dsn with correct credentials / not set user / not set password\n"; 52 dsn without credentials / correct user / correct password 55 dsn with correct user / incorrect user / correct password 58 dsn with correct password / correct user / incorrect password 61 dsn with correct credentials / incorrect user / incorrect password 64 dsn with correct credentials / null user / null password [all …]
|
/php-src/ext/sodium/ |
H A D | sodium_pwhash.c | 62 static zend_string *php_sodium_argon2_hash(const zend_string *password, zend_array *options, int al… in php_sodium_argon2_hash() argument 66 if ((ZSTR_LEN(password) >= 0xffffffff)) { in php_sodium_argon2_hash() 76 …if (crypto_pwhash_str_alg(ZSTR_VAL(ret), ZSTR_VAL(password), ZSTR_LEN(password), opslimit, memlimi… in php_sodium_argon2_hash() 88 static bool php_sodium_argon2_verify(const zend_string *password, const zend_string *hash) { in php_sodium_argon2_verify() argument 89 if ((ZSTR_LEN(password) >= 0xffffffff) || (ZSTR_LEN(hash) >= 0xffffffff)) { in php_sodium_argon2_verify() 92 return crypto_pwhash_str_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password)) == 0; in php_sodium_argon2_verify() 135 static zend_string *php_sodium_argon2i_hash(const zend_string *password, zend_array *options) { in php_sodium_argon2i_hash() argument 136 return php_sodium_argon2_hash(password, options, crypto_pwhash_ALG_ARGON2I13); in php_sodium_argon2i_hash() 150 static zend_string *php_sodium_argon2id_hash(const zend_string *password, zend_array *options) { in php_sodium_argon2id_hash() argument 151 return php_sodium_argon2_hash(password, options, crypto_pwhash_ALG_ARGON2ID13); in php_sodium_argon2id_hash()
|
/php-src/ext/openssl/ |
H A D | openssl_pwhash.c | 141 if ((ZSTR_LEN(password) >= UINT32_MAX)) { in php_openssl_argon2_hash() 153 …ZSTR_VAL(password), ZSTR_LEN(password), salt, PHP_OPENSSL_SALT_SIZE, hash, PHP_OPENSSL_HASH_SIZE))… in php_openssl_argon2_hash() 234 ZSTR_VAL(password), ZSTR_LEN(password), (unsigned char *)ZSTR_VAL(salt), in php_openssl_argon2_verify() 248 return php_openssl_argon2_verify(password, digest, "argon2i"); in php_openssl_argon2i_verify() 253 return php_openssl_argon2_verify(password, digest, "argon2id"); in php_openssl_argon2id_verify() 294 return php_openssl_argon2_hash(password, options, "argon2i"); in php_openssl_argon2i_hash() 308 return php_openssl_argon2_hash(password, options, "argon2id"); in php_openssl_argon2id_hash() 322 zend_string *password, *algo, *digest; in PHP_FUNCTION() local 327 Z_PARAM_STR(password) in PHP_FUNCTION() 350 zend_string *password, *algo, *digest; in PHP_FUNCTION() local [all …]
|
/php-src/ext/standard/ |
H A D | php_password.h | 21 PHP_MINIT_FUNCTION(password); 22 PHP_MSHUTDOWN_FUNCTION(password); 41 zend_string *(*hash)(const zend_string *password, zend_array *options); 42 bool (*verify)(const zend_string *password, const zend_string *hash); 43 bool (*needs_rehash)(const zend_string *password, zend_array *options);
|
H A D | password.c | 184 if (memchr(ZSTR_VAL(password), '\0', ZSTR_LEN(password))) { in php_password_bcrypt_hash() 209 …result = php_crypt(ZSTR_VAL(password), (int)ZSTR_LEN(password), ZSTR_VAL(hash), (int)ZSTR_LEN(hash… in php_password_bcrypt_hash() 356 ZSTR_VAL(password), in php_password_argon2_hash() 357 ZSTR_LEN(password), in php_password_argon2_hash() 384 …return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password), Argon2_i… in php_password_argon2i_verify() 403 …return ARGON2_OK == argon2_verify(ZSTR_VAL(hash), ZSTR_VAL(password), ZSTR_LEN(password), Argon2_i… in php_password_argon2id_verify() 420 PHP_MINIT_FUNCTION(password) /* {{{ */ in PHP_MINIT_FUNCTION() argument 614 zend_string *password, *hash; in PHP_FUNCTION() local 618 Z_PARAM_STR(password) in PHP_FUNCTION() 630 zend_string *password, *digest = NULL; in PHP_FUNCTION() local [all …]
|
H A D | crypt.c | 70 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_… in php_crypt() argument 88 out = php_md5_crypt_r(password, salt, output); in php_crypt() 97 crypt_res = php_sha512_crypt_r(password, salt, output, PHP_MAX_SALT_LEN); in php_crypt() 112 crypt_res = php_sha256_crypt_r(password, salt, output, PHP_MAX_SALT_LEN); in php_crypt() 132 crypt_res = php_crypt_blowfish_rn(password, salt, output, sizeof(output)); in php_crypt() 147 crypt_res = _crypt_extended_r((const unsigned char *) password, salt, &buffer); in php_crypt() 170 crypt_res = crypt_r(password, salt, &buffer); in php_crypt() 172 crypt_res = crypt(password, salt); in php_crypt()
|
/php-src/ext/soap/tests/bugs/ |
H A D | multiport.phpt | 11 $response = $client->GetSessionId(array('userId'=>'user', 'password'=>'password')); 16 …ENV:Body><ns1:GetSessionId><ns1:userId>user</ns1:userId><ns1:password>password</ns1:password></ns1…
|
/php-src/ext/hash/tests/ |
H A D | hash_pbkdf2_error.phpt | 6 /* Generate a PBKDF2 hash of the given password and salt 11 $password = 'password'; 16 var_dump(hash_pbkdf2('foo', $password, $salt, 1)); 25 var_dump(hash_pbkdf2('crc32', $password, $salt, 1)); 33 var_dump(hash_pbkdf2('md5', $password, $salt, 0)); 40 var_dump(hash_pbkdf2('md5', $password, $salt, -1)); 48 var_dump(hash_pbkdf2('md5', $password, $salt, 1, -1));
|
H A D | hash_pbkdf2_basic.phpt | 8 echo "sha1: " . hash_pbkdf2('sha1', 'password', 'salt', 1, 20)."\n"; 9 echo "sha1(no length): " . hash_pbkdf2('sha1', 'password', 'salt', 1)."\n"; 10 echo "sha1(raw): " . bin2hex(hash_pbkdf2('sha1', 'password', 'salt', 1, 20, TRUE))."\n"; 13 echo "sha256: " . hash_pbkdf2('sha256', 'password', 'salt', 1, 20)."\n"; 14 echo "sha256(no length): " . hash_pbkdf2('sha256', 'password', 'salt', 1)."\n"; 15 echo "sha256(raw): " . bin2hex(hash_pbkdf2('sha256', 'password', 'salt', 1, 20, TRUE))."\n";
|
H A D | bug64745.phpt | 5 $hash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0); 6 $rawHash = hash_pbkdf2('sha1', 'password', 'salt', 1, 0, true);
|
/php-src/ext/standard/tests/password/ |
H A D | password_hash_argon2.phpt | 11 $password = "the password for testing 12345!"; 22 $hash = password_hash($password, $algo); 23 var_dump(password_verify($password, $hash));
|
/php-src/ext/pdo_mysql/tests/ |
H A D | pecl_bug_5780.phpt | 16 $db->exec("CREATE TABLE test_pecl_bug_5780_2 (login varchar(32) NOT NULL, password varchar(64) NOT … 17 $db->exec("INSERT INTO test_pecl_bug_5780_2 (login, password) VALUES ('testing', 'testing')"); 18 $db->exec("INSERT INTO test_pecl_bug_5780_2 (login, password) VALUES ('test2', 'testpw2')"); 21 $authstmt = $db->prepare('SELECT * FROM test_pecl_bug_5780_2 WHERE login = :varlog AND password = :…
|
/php-src/tests/basic/ |
H A D | bug53180.phpt | 6 email=foo&password=bar&submit=Log+on 15 ["password"]=>
|
/php-src/ext/standard/tests/strings/ |
H A D | bug50052.phpt | 6 $password = 'test'; 8 echo crypt($password,$salt) . "\n";
|