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

/PHP_5_6/ext/standard/
H A Dcrypt_blowfish.c663 BF_word salt[4]; member in union:__anon457::__anon458
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.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
594 php_sha256_crypt(const char *key, const char *salt) argument
664 const char *salt; member in struct:__anon462
[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:__anon464
[all...]
H A Dcrypt.c148 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 Dpassword.c162 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 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...]
/PHP_5_6/ext/hash/
H A Dhash.c607 /* {{{ 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; local
620 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) {
641 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Supplied salt is too long, max of INT_MAX - 4 bytes: %d supplied", salt_len);
675 memcpy(computed_salt, (unsigned char *) salt, salt_len);
678 /* digest = hash_hmac(salt + pack('N', i), password) { */
925 /* {{{ proto string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)
931 char *password, *salt; local
935 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt,
[all...]
/PHP_5_6/ext/openssl/
H A Dopenssl.c264 ZEND_ARG_INFO(0, salt)
3900 /* {{{ proto string openssl_pbkdf2(string password, string salt, long key_length, long iterations [, string digest_method = "sha1"])
3906 char *salt; int salt_len; local
3914 &salt, &salt_len,
3938 if (PKCS5_PBKDF2_HMAC(password, password_len, (unsigned char *)salt, salt_len, iterations, digest, key_length, out_buffer) == 1) {

Completed in 64 milliseconds