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

/PHP_TRUNK/ext/standard/
H A Dcrypt_blowfish.c663 BF_word salt[4]; member in union:__anon442::__anon443
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 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
319 php_md5_crypt_r(const char *pw, const char *salt, char *out) argument
[all...]
H A Dcrypt_sha512.c347 /* Define our magic string to mark salt for SHA512 "encryption"
354 /* Maximum salt string length. */
369 php_sha512_crypt_r(const char *key, const char *salt, char *buffer, int buflen) { argument
398 /* Find beginning of salt string. The prefix should normally always
400 if (strncmp(sha512_salt_prefix, salt, sizeof(sha512_salt_prefix) - 1) == 0) {
401 /* Skip salt prefix. */
402 salt += sizeof(sha512_salt_prefix) - 1;
405 if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1) == 0) {
406 const char *num = salt + sizeof(sha512_rounds_prefix) - 1;
411 salt
641 php_sha512_crypt(const char *key, const char *salt) argument
727 const char *salt; member in struct:__anon4
[all...]
H A Dcrypt.c148 PHPAPI zend_string *php_crypt(const char *password, const int pass_len, const char *salt, int salt_len) argument
158 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') {
161 out = php_md5_crypt_r(password, salt, output);
166 } else if (salt[0]=='$' && salt[1]=='6' && salt[2]=='$') {
170 crypt_res = php_sha512_crypt_r(password, salt, output, PHP_MAX_SALT_LEN);
181 } else if (salt[
260 char salt[PHP_MAX_SALT_LEN + 1]; local
[all...]
H A Dcrypt_sha256.c314 /* Define our magic string to mark salt for SHA256 "encryption"
321 /* Maximum salt string length. */
334 char * php_sha256_crypt_r(const char *key, const char *salt, char *buffer, int buflen) argument
365 /* Find beginning of salt string. The prefix should normally always
367 if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0) {
368 /* Skip salt prefix. */
369 salt += sizeof(sha256_salt_prefix) - 1;
372 if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1) == 0) {
373 const char *num = salt + sizeof(sha256_rounds_prefix) - 1;
377 salt
593 php_sha256_crypt(const char *key, const char *salt) argument
663 const char *salt; member in struct:__anon2
[all...]
H A Dpassword.c161 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Generated salt too short");
299 char *hash_format, *hash, *salt, *password; local
346 if (options && (option_buffer = zend_symtable_str_find(options, "salt", sizeof("salt")-1)) != NULL) {
376 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Non-string salt parameter supplied");
386 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long");
391 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %zd expecting %zd", buffer_len, required_salt_len);
394 salt = safe_emalloc(required_salt_len, 1, 1);
395 if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) == FAILURE) {
398 efree(salt);
[all...]
/PHP_TRUNK/ext/hash/
H A Dhash.c598 /* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int length = 0, bool raw_output = false])
599 Generate a PBKDF2 hash of the given password and salt
604 char *algo, *salt, *pass = NULL; 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) {
633 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long, max of INT_MAX - 4 bytes: %zd supplied", salt_len);
667 memcpy(computed_salt, (unsigned char *) salt, salt_len);
670 /* digest = hash_hmac(salt + pack('N', i), password) { */
917 /* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)
923 char *password, *salt; local
927 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt,
[all...]
/PHP_TRUNK/ext/openssl/
H A Dopenssl.c264 ZEND_ARG_INFO(0, salt)
3872 /* {{{ proto string openssl_pbkdf2(string password, string salt, long key_length, long iterations [, string digest_method = "sha1"])
3879 char *salt; 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) {

Completed in 23 milliseconds