| /PHP_5_5/ext/standard/ |
| H A D | crypt_blowfish.c | 663 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 D | crypt_freesec.c | 357 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 D | crypt_sha256.c | 320 /* 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:__anon447 [all...] |
| H A D | crypt_sha512.c | 353 /* 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:__anon449 [all...] |
| H A D | crypt.c | 148 PHPAPI int php_crypt(const char *password, const int pass_len, const char *salt, int salt_len, char **result) argument 157 if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$') { 160 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 D | password.c | 162 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Generated salt too short"); 310 char *hash_format, *hash, *salt, *password, *result; local 355 if (options && zend_symtable_find(options, "salt", 5, (void**) &option_buffer) == SUCCESS) { 384 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Non-string salt parameter supplied"); 390 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long"); 396 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt is too short: %lu expecting %lu", (unsigned long) buffer_len, (unsigned long) required_salt_len); 399 salt = safe_emalloc(required_salt_len, 1, 1); 400 if (php_password_salt_to64(buffer, buffer_len, required_salt_len, salt) == FAILURE) { 403 efree(salt); 404 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Provided salt i [all...] |
| H A D | php_crypt_r.c | 127 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...] |
| /PHP_5_5/ext/hash/ |
| H A D | hash.c | 607 /* {{{ proto string hash_pbkdf2(string algo, string password, string salt, int iterations [, int length = 0, bool raw_output = false]) 608 Generate a PBKDF2 hash of the given password and salt 612 char *returnval, *algo, *salt, *pass = NULL; local 621 if (zend_parse_parameters(argc TSRMLS_CC, "sssl|lb", &algo, &algo_len, &pass, &pass_len, &salt, &salt_len, &iterations, &length, &raw_output) == FAILURE) { 642 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long, max of INT_MAX - 4 bytes: %d supplied", salt_len); 673 memcpy(computed_salt, (unsigned char *) salt, salt_len); 676 /* digest = hash_hmac(salt + pack('N', i), password) { */ 883 /* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes) 889 char *password, *salt; local 893 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, [all...] |
| /PHP_5_5/ext/openssl/ |
| H A D | openssl.c | 250 ZEND_ARG_INFO(0, salt) 3364 /* {{{ proto string openssl_pbkdf2(string password, string salt, long key_length, long iterations [, string digest_method = "sha1"]) 3370 char *salt; int salt_len; local 3378 &salt, &salt_len, 3402 if (PKCS5_PBKDF2_HMAC(password, password_len, (unsigned char *)salt, salt_len, iterations, digest, key_length, out_buffer) == 1) {
|