version 1.1, 2012/02/21 23:48:02
|
version 1.1.1.2, 2012/05/29 12:34:43
|
Line 200 PHP_FUNCTION(crypt)
|
Line 200 PHP_FUNCTION(crypt)
|
int needed = (sizeof(sha512_salt_prefix) - 1 |
int needed = (sizeof(sha512_salt_prefix) - 1 |
+ sizeof(sha512_rounds_prefix) + 9 + 1 |
+ sizeof(sha512_rounds_prefix) + 9 + 1 |
+ strlen(salt) + 1 + 43 + 1); |
+ strlen(salt) + 1 + 43 + 1); |
output = emalloc(needed * sizeof(char *)); | output = emalloc(needed); |
salt[salt_in_len] = '\0'; |
salt[salt_in_len] = '\0'; |
|
|
crypt_res = php_sha512_crypt_r(str, salt, output, needed); |
crypt_res = php_sha512_crypt_r(str, salt, output, needed); |
Line 223 PHP_FUNCTION(crypt)
|
Line 223 PHP_FUNCTION(crypt)
|
int needed = (sizeof(sha256_salt_prefix) - 1 |
int needed = (sizeof(sha256_salt_prefix) - 1 |
+ sizeof(sha256_rounds_prefix) + 9 + 1 |
+ sizeof(sha256_rounds_prefix) + 9 + 1 |
+ strlen(salt) + 1 + 43 + 1); |
+ strlen(salt) + 1 + 43 + 1); |
output = emalloc(needed * sizeof(char *)); | output = emalloc(needed); |
salt[salt_in_len] = '\0'; |
salt[salt_in_len] = '\0'; |
|
|
crypt_res = php_sha256_crypt_r(str, salt, output, needed); |
crypt_res = php_sha256_crypt_r(str, salt, output, needed); |