Searched defs:salt (Results 1 - 7 of 7) sorted by relevance

/PHP_5_3/ext/standard/
H A Dcrypt_blowfish.c663 BF_word salt[4]; member in union:__anon430::__anon431
692 if (count < min || BF_decode(data.binary.salt, &setting[7], 16)) {
696 BF_swap(data.binary.salt, 4);
705 L ^= data.binary.salt[i & 2];
706 R ^= data.binary.salt[(i & 2) + 1];
715 L ^= data.binary.salt[(BF_N + 2) & 3];
716 R ^= data.binary.salt[(BF_N + 3) & 3];
721 L ^= data.binary.salt[(BF_N + 4) & 3];
722 R ^= data.binary.salt[(BF_N + 5) & 3];
743 tmp1 = data.binary.salt[
[all...]
H A Dcrypt_freesec.c357 setup_salt(uint32_t salt, struct php_crypt_extended_data *data) argument
362 if (salt == data->old_salt)
364 data->old_salt = salt;
370 if (salt & saltbit)
582 des_cipher(const char *in, char *out, uint32_t salt, int count, argument
588 setup_salt(salt, data);
620 uint32_t count, salt, l, r0, r1, keybuf[2]; local
642 * setting - underscore, 4 chars of count, 4 chars of salt
654 for (i = 5, salt = 0; i < 9; i++) {
658 salt |
[all...]
H A Dcrypt_sha256.c320 /* Define our magic string to mark salt for SHA256 "encryption"
327 /* Maximum salt string length. */
340 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) argument
371 /* Find beginning of salt string. The prefix should normally always
373 if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0) {
374 /* Skip salt prefix. */
375 salt += sizeof(sha256_salt_prefix) - 1;
378 if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1) == 0) {
379 const char *num = salt + sizeof(sha256_rounds_prefix) - 1;
383 salt
600 php_sha256_crypt(const char *key, const char *salt) argument
670 const char *salt; member in struct:__anon435
[all...]
H A Dcrypt_sha512.c353 /* Define our magic string to mark salt for SHA512 "encryption"
360 /* Maximum salt string length. */
375 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { argument
404 /* Find beginning of salt string. The prefix should normally always
406 if (strncmp(sha512_salt_prefix, salt, sizeof(sha512_salt_prefix) - 1) == 0) {
407 /* Skip salt prefix. */
408 salt += sizeof(sha512_salt_prefix) - 1;
411 if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1) == 0) {
412 const char *num = salt + sizeof(sha512_rounds_prefix) - 1;
417 salt
647 php_sha512_crypt(const char *key, const char *salt) argument
733 const char *salt; member in struct:__anon437
[all...]
H A Dcrypt.c148 /* {{{ proto string crypt(string str [, string salt])
152 char salt[PHP_MAX_SALT_LEN + 1]; local
156 salt[0] = salt[PHP_MAX_SALT_LEN] = '\0';
159 * available (passing always 2-character salt). At least for glibc6.1 */
160 memset(&salt[1], '$', PHP_MAX_SALT_LEN - 1);
167 memcpy(salt, salt_in, MIN(PHP_MAX_SALT_LEN, salt_in_len));
170 /* The automatic salt generation covers standard DES, md5-crypt and Blowfish (simple) */
171 if (!*salt) {
173 strncpy(salt, "
[all...]
H A Dphp_crypt_r.c127 char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { argument
136 const char *sp = salt;
137 const char *ep = salt;
149 /* Refine the salt first */
150 sp = salt;
162 /* get the length of the true salt */
180 /* Then the raw salt */
185 /* MD5(pw,salt,pw), valid. */
186 /* Then just as many characters of the MD5(pw,salt,pw) */
202 /* MD5(pw,salt,p
324 php_md5_crypt_r(const char *pw, const char *salt, char *out) argument
[all...]
/PHP_5_3/ext/hash/
H A Dhash.c740 /* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)
746 char *password, *salt; local
750 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &l_bytes) == FAILURE) {
762 memcpy(padded_salt, salt, salt_len);
1010 ZEND_ARG_INFO(0, salt)

Completed in 25 milliseconds