salt              617 ext/hash/hash.c 	char *returnval, *algo, *salt, *pass;
salt              625 ext/hash/hash.c 	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) {
salt              680 ext/hash/hash.c 	memcpy(computed_salt, (unsigned char *) salt, salt_len);
salt              936 ext/hash/hash.c 	char *password, *salt;
salt              940 ext/hash/hash.c 	if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &l_bytes) == FAILURE) {
salt              952 ext/hash/hash.c 	memcpy(padded_salt, salt, salt_len);
salt             1194 ext/hash/hash.c 	ZEND_ARG_INFO(0, salt)
salt             1218 ext/hash/hash.c 	ZEND_ARG_INFO(0, salt)
salt              264 ext/openssl/openssl.c 	ZEND_ARG_INFO(0, salt)
salt             3988 ext/openssl/openssl.c 	char *salt; int salt_len;
salt             3996 ext/openssl/openssl.c 				&salt, &salt_len,
salt             4020 ext/openssl/openssl.c 	if (PKCS5_PBKDF2_HMAC(password, password_len, (unsigned char *)salt, salt_len, iterations, digest, key_length, out_buffer) == 1) {
salt              889 ext/standard/basic_functions.c 	ZEND_ARG_INFO(0, salt)
salt              148 ext/standard/crypt.c PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, char **result)
salt              157 ext/standard/crypt.c 		if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') {
salt              160 ext/standard/crypt.c 			out = php_md5_crypt_r(password, salt, output);
salt              166 ext/standard/crypt.c 		} else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') {
salt              170 ext/standard/crypt.c 			crypt_res = php_sha512_crypt_r(password, salt, output, PHP_MAX_SALT_LEN);
salt              181 ext/standard/crypt.c 		} else if (salt[0]=='$' && salt[1]=='5' && salt[2]=='$') {
salt              185 ext/standard/crypt.c 			crypt_res = php_sha256_crypt_r(password, salt, output, PHP_MAX_SALT_LEN);
salt              197 ext/standard/crypt.c 				salt[0] == '$' &&
salt              198 ext/standard/crypt.c 				salt[1] == '2' &&
salt              199 ext/standard/crypt.c 				salt[3] == '$' &&
salt              200 ext/standard/crypt.c 				salt[4] >= '0' && salt[4] <= '3' &&
salt              201 ext/standard/crypt.c 				salt[5] >= '0' && salt[5] <= '9' &&
salt              202 ext/standard/crypt.c 				salt[6] == '$') {
salt              207 ext/standard/crypt.c 			crypt_res = php_crypt_blowfish_rn(password, salt, output, sizeof(output));
salt              220 ext/standard/crypt.c 			crypt_res = _crypt_extended_r(password, salt, &buffer);
salt              221 ext/standard/crypt.c 			if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
salt              241 ext/standard/crypt.c 		crypt_res = crypt_r(password, salt, &buffer);
salt              242 ext/standard/crypt.c 		if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
salt              259 ext/standard/crypt.c 	char salt[PHP_MAX_SALT_LEN + 1];
salt              262 ext/standard/crypt.c 	salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
salt              266 ext/standard/crypt.c 	memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);
salt              273 ext/standard/crypt.c 		memcpy(salt, salt_in, MIN(PHP_MAX_SALT_LEN, salt_in_len));
salt              279 ext/standard/crypt.c 	if (!*salt) {
salt              281 ext/standard/crypt.c 		strncpy(salt, "$1$", PHP_MAX_SALT_LEN);
salt              282 ext/standard/crypt.c 		php_to64(&salt[3], PHP_CRYPT_RAND, 4);
salt              283 ext/standard/crypt.c 		php_to64(&salt[7], PHP_CRYPT_RAND, 4);
salt              284 ext/standard/crypt.c 		strncpy(&salt[11], "$", PHP_MAX_SALT_LEN - 11);
salt              286 ext/standard/crypt.c 		php_to64(&salt[0], PHP_CRYPT_RAND, 2);
salt              287 ext/standard/crypt.c 		salt[2] = '\0';
salt              289 ext/standard/crypt.c 		salt_in_len = strlen(salt);
salt              293 ext/standard/crypt.c 	salt[salt_in_len] = '\0';
salt              295 ext/standard/crypt.c 	if (php_crypt(str, str_len, salt, salt_in_len, &result) == FAILURE) {
salt              296 ext/standard/crypt.c 		if (salt[0] == '*' && salt[1] == '0') {
salt              665 ext/standard/crypt_blowfish.c 			BF_word salt[4];
salt              694 ext/standard/crypt_blowfish.c 	if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
salt              698 ext/standard/crypt_blowfish.c 	BF_swap(data.binary.salt, 4);
salt              707 ext/standard/crypt_blowfish.c 		L ^= data.binary.salt[i & 2];
salt              708 ext/standard/crypt_blowfish.c 		R ^= data.binary.salt[(i & 2) + 1];
salt              717 ext/standard/crypt_blowfish.c 		L ^= data.binary.salt[(BF_N + 2) & 3];
salt              718 ext/standard/crypt_blowfish.c 		R ^= data.binary.salt[(BF_N + 3) & 3];
salt              723 ext/standard/crypt_blowfish.c 		L ^= data.binary.salt[(BF_N + 4) & 3];
salt              724 ext/standard/crypt_blowfish.c 		R ^= data.binary.salt[(BF_N + 5) & 3];
salt              745 ext/standard/crypt_blowfish.c 			tmp1 = data.binary.salt[0];
salt              746 ext/standard/crypt_blowfish.c 			tmp2 = data.binary.salt[1];
salt              747 ext/standard/crypt_blowfish.c 			tmp3 = data.binary.salt[2];
salt              748 ext/standard/crypt_blowfish.c 			tmp4 = data.binary.salt[3];
salt              357 ext/standard/crypt_freesec.c setup_salt(uint32_t salt, struct php_crypt_extended_data *data)
salt              362 ext/standard/crypt_freesec.c 	if (salt == data->old_salt)
salt              364 ext/standard/crypt_freesec.c 	data->old_salt = salt;
salt              370 ext/standard/crypt_freesec.c 		if (salt & saltbit)
salt              582 ext/standard/crypt_freesec.c des_cipher(const char *in, char *out, uint32_t salt, int count,
salt              588 ext/standard/crypt_freesec.c 	setup_salt(salt, data);
salt              620 ext/standard/crypt_freesec.c 	uint32_t	count, salt, l, r0, r1, keybuf[2];
salt              654 ext/standard/crypt_freesec.c 		for (i = 5, salt = 0; i < 9; i++) {
salt              658 ext/standard/crypt_freesec.c 			salt |= value << (i - 5) * 6;
salt              692 ext/standard/crypt_freesec.c 		salt = (ascii_to_bin(setting[1]) << 6)
salt              699 ext/standard/crypt_freesec.c 	setup_salt(salt, data);
salt              334 ext/standard/crypt_sha256.c char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen)
salt              367 ext/standard/crypt_sha256.c 	if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0) {
salt              369 ext/standard/crypt_sha256.c 		salt += sizeof(sha256_salt_prefix) - 1;
salt              372 ext/standard/crypt_sha256.c 	if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1) == 0) {
salt              373 ext/standard/crypt_sha256.c 		const char *num = salt + sizeof(sha256_rounds_prefix) - 1;
salt              377 ext/standard/crypt_sha256.c 			salt = endp + 1;
salt              383 ext/standard/crypt_sha256.c 	salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX);
salt              391 ext/standard/crypt_sha256.c 	if ((salt - (char *) 0) % __alignof__(uint32_t) != 0) {
salt              393 ext/standard/crypt_sha256.c 		salt = copied_salt =
salt              394 ext/standard/crypt_sha256.c 		memcpy(tmp + __alignof__(uint32_t) - (tmp - (char *) 0) % __alignof__ (uint32_t), salt, salt_len);
salt              407 ext/standard/crypt_sha256.c 	sha256_process_bytes(salt, salt_len, &ctx);
salt              418 ext/standard/crypt_sha256.c 	sha256_process_bytes(salt, salt_len, &alt_ctx);
salt              469 ext/standard/crypt_sha256.c 		sha256_process_bytes(salt, salt_len, &alt_ctx);
salt              531 ext/standard/crypt_sha256.c 	cp = __php_stpncpy(cp, salt, MIN ((size_t) MAX (0, buflen), salt_len));
salt              594 ext/standard/crypt_sha256.c char * php_sha256_crypt(const char *key, const char *salt)
salt              604 ext/standard/crypt_sha256.c 			+ strlen(salt) + 1 + 43 + 1);
salt              616 ext/standard/crypt_sha256.c 	return php_sha256_crypt_r(key, salt, buffer, buflen);
salt              664 ext/standard/crypt_sha256.c 	const char *salt;
salt              741 ext/standard/crypt_sha256.c 		char *cp = php_sha256_crypt(tests2[cnt].input, tests2[cnt].salt);
salt              369 ext/standard/crypt_sha512.c php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) {
salt              400 ext/standard/crypt_sha512.c 	if (strncmp(sha512_salt_prefix, salt, sizeof(sha512_salt_prefix) - 1) == 0) {
salt              402 ext/standard/crypt_sha512.c 		salt += sizeof(sha512_salt_prefix) - 1;
salt              405 ext/standard/crypt_sha512.c 	if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1) == 0) {
salt              406 ext/standard/crypt_sha512.c 		const char *num = salt + sizeof(sha512_rounds_prefix) - 1;
salt              411 ext/standard/crypt_sha512.c 			salt = endp + 1;
salt              417 ext/standard/crypt_sha512.c 	salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX);
salt              426 ext/standard/crypt_sha512.c 	if ((salt - (char *) 0) % __alignof__ (uint64_t) != 0) {
salt              428 ext/standard/crypt_sha512.c 		salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) - (tmp - (char *) 0) % __alignof__(uint64_t), salt, salt_len);
salt              441 ext/standard/crypt_sha512.c 	sha512_process_bytes(salt, salt_len, &ctx);
salt              452 ext/standard/crypt_sha512.c 	sha512_process_bytes(salt, salt_len, &alt_ctx);
salt              504 ext/standard/crypt_sha512.c 		sha512_process_bytes(salt, salt_len, &alt_ctx);
salt              566 ext/standard/crypt_sha512.c 	cp = __php_stpncpy(cp, salt, MIN((size_t) MAX(0, buflen), salt_len));
salt              641 ext/standard/crypt_sha512.c php_sha512_crypt(const char *key, const char *salt) {
salt              650 ext/standard/crypt_sha512.c 		+ strlen(salt) + 1 + 86 + 1);
salt              662 ext/standard/crypt_sha512.c 	return php_sha512_crypt_r (key, salt, buffer, buflen);
salt              727 ext/standard/crypt_sha512.c 	const char *salt;
salt              807 ext/standard/crypt_sha512.c 		char *cp = php_sha512_crypt(tests2[cnt].input, tests2[cnt].salt);
salt              310 ext/standard/password.c 	char hash_format[8], *hash, *salt, *password, *result;
salt              400 ext/standard/password.c 			salt = safe_emalloc(required_salt_len, 1, 1);
salt              401 ext/standard/password.c 			if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) == FAILURE) {
salt              402 ext/standard/password.c 				efree(salt);
salt              411 ext/standard/password.c 			salt = safe_emalloc(required_salt_len, 1, 1);
salt              412 ext/standard/password.c 			memcpy(salt, buffer, (int) required_salt_len);
salt              419 ext/standard/password.c 		salt = safe_emalloc(required_salt_len, 1, 1);
salt              420 ext/standard/password.c 		if (php_password_make_salt(required_salt_len, salt TSRMLS_CC) == FAILURE) {
salt              421 ext/standard/password.c 			efree(salt);
salt              427 ext/standard/password.c 	salt[salt_len] = 0;
salt              430 ext/standard/password.c 	sprintf(hash, "%s%s", hash_format, salt);
salt              433 ext/standard/password.c 	efree(salt);
salt               26 ext/standard/php_crypt.h PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, char **result);
salt              127 ext/standard/php_crypt_r.c char * php_md5_crypt_r(const char *pw, const char *salt, char *out) {
salt              136 ext/standard/php_crypt_r.c 	const char *sp = salt;
salt              137 ext/standard/php_crypt_r.c 	const char *ep = salt;
salt              150 ext/standard/php_crypt_r.c 	sp = salt;
salt              319 ext/standard/php_crypt_r.c char * php_md5_crypt_r(const char *pw, const char *salt, char *out)
salt              332 ext/standard/php_crypt_r.c 	sp = salt;
salt               51 ext/standard/php_crypt_r.h extern char * php_md5_crypt_r(const char *pw, const char *salt, char *out);
salt               52 ext/standard/php_crypt_r.h extern char * php_sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen);
salt               53 ext/standard/php_crypt_r.h extern char * php_sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen);