Searched refs:salt_len (Results 1 - 7 of 7) sorted by relevance

/PHP_TRUNK/ext/standard/
H A Dcrypt.c154 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet) argument
H A Dphp_crypt.h26 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, zend_bool quiet);
H A Dpassword.c295 size_t salt_len = 0, required_salt_len = 0, hash_format_len; local
384 salt_len = required_salt_len;
388 salt_len = required_salt_len;
398 salt_len = required_salt_len;
401 salt[salt_len] = 0;
403 hash = safe_emalloc(salt_len + hash_format_len, 1, 1);
405 hash[hash_format_len + salt_len] = 0;
411 hash_len = (int) (hash_format_len + salt_len);
H A Dcrypt_sha256.c353 size_t salt_len; local
383 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX);
392 char *tmp = (char *) alloca(salt_len + 1 + __alignof__(uint32_t));
394 memcpy(tmp + __alignof__(uint32_t) - (tmp - (char *) 0) % __alignof__ (uint32_t), salt, salt_len);
395 copied_salt[salt_len] = 0;
407 sha256_process_bytes(salt, salt_len, &ctx);
418 sha256_process_bytes(salt, salt_len, &alt_ctx);
469 sha256_process_bytes(salt, salt_len, &alt_ctx);
476 cp = s_bytes = alloca(salt_len);
477 for (cnt = salt_len; cn
[all...]
H A Dcrypt_sha512.c386 size_t salt_len; local
417 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX);
427 char *tmp = (char *) alloca(salt_len + 1 + __alignof__(uint64_t));
428 salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) - (tmp - (char *) 0) % __alignof__(uint64_t), salt, salt_len);
429 copied_salt[salt_len] = 0;
441 sha512_process_bytes(salt, salt_len, &ctx);
452 sha512_process_bytes(salt, salt_len, &alt_ctx);
504 sha512_process_bytes(salt, salt_len, &alt_ctx);
511 cp = s_bytes = alloca(salt_len);
512 for (cnt = salt_len; cn
[all...]
/PHP_TRUNK/ext/hash/
H A Dhash.c615 size_t algo_len, pass_len, salt_len = 0; local
620 if (zend_parse_parameters(ZEND_NUM_ARGS(), "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output) == FAILURE) {
640 if (salt_len > INT_MAX - 4) {
641 php_error_docref(NULL, E_WARNING, "Supplied salt is too long, max of INT_MAX - 4 bytes: %zd supplied", salt_len);
674 computed_salt = safe_emalloc(salt_len, 1, 4);
675 memcpy(computed_salt, (unsigned char *) salt, salt_len);
681 computed_salt[salt_len] = (unsigned char) (i >> 24);
682 computed_salt[salt_len + 1] = (unsigned char) ((i & 0xFF0000) >> 16);
683 computed_salt[salt_len + 2] = (unsigned char) ((i & 0xFF00) >> 8);
684 computed_salt[salt_len
937 size_t password_len, salt_len; local
[all...]
/PHP_TRUNK/ext/openssl/
H A Dopenssl.c3996 size_t salt_len; local
4005 &salt, &salt_len,
4028 if (PKCS5_PBKDF2_HMAC(password, (int)password_len, (unsigned char *)salt, (int)salt_len, (int)iterations, digest, (int)key_length, (unsigned char*)ZSTR_VAL(out_buffer)) == 1) {

Completed in 30 milliseconds