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

/PHP_TRUNK/ext/hash/
H A Dhash.c607 size_t algo_len, pass_len, salt_len = 0; local
612 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output) == FAILURE) {
632 if (salt_len > INT_MAX - 4) {
633 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long, max of INT_MAX - 4 bytes: %zd supplied", salt_len);
666 computed_salt = safe_emalloc(salt_len, 1, 4);
667 memcpy(computed_salt, (unsigned char *) salt, salt_len);
673 computed_salt[salt_len] = (unsigned char) (i >> 24);
674 computed_salt[salt_len + 1] = (unsigned char) ((i & 0xFF0000) >> 16);
675 computed_salt[salt_len + 2] = (unsigned char) ((i & 0xFF00) >> 8);
676 computed_salt[salt_len
924 size_t password_len, salt_len; local
[all...]
/PHP_TRUNK/ext/openssl/
H A Dopenssl.c3880 size_t salt_len; local
3889 &salt, &salt_len,
3912 if (PKCS5_PBKDF2_HMAC(password, password_len, (unsigned char *)salt, salt_len, iterations, digest, key_length, (unsigned char*)out_buffer->val) == 1) {
/PHP_TRUNK/ext/standard/
H A Dphp_crypt.h26 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len);
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...]
H A Dcrypt.c148 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len) argument
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 Dpassword.c303 size_t salt_len = 0, required_salt_len = 0, hash_format_len; local
402 salt_len = required_salt_len;
406 salt_len = required_salt_len;
416 salt_len = required_salt_len;
419 salt[salt_len] = 0;
421 hash = safe_emalloc(salt_len + hash_format_len, 1, 1);
423 hash[hash_format_len + salt_len] = 0;
429 hash_len = (int) (hash_format_len + salt_len);

Completed in 24 milliseconds