Diff for /embedaddon/php/ext/hash/hash.c between versions 1.1.1.1 and 1.1.1.4

version 1.1.1.1, 2012/02/21 23:47:56 version 1.1.1.4, 2014/06/15 20:03:49
Line 2 Line 2
   +----------------------------------------------------------------------+    +----------------------------------------------------------------------+
   | PHP Version 5                                                        |    | PHP Version 5                                                        |
   +----------------------------------------------------------------------+    +----------------------------------------------------------------------+
  | Copyright (c) 1997-2012 The PHP Group                                |  | Copyright (c) 1997-2014 The PHP Group                                |
   +----------------------------------------------------------------------+    +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |    | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |    | that is bundled with this package in the file LICENSE, and is        |
Line 43  struct mhash_bc_entry { Line 43  struct mhash_bc_entry {
         int value;          int value;
 };  };
   
#define MHASH_NUM_ALGOS 29#define MHASH_NUM_ALGOS 34
   
 static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_ALGOS] = {  static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_ALGOS] = {
         {"CRC32", "crc32", 0},          {"CRC32", "crc32", 0},
Line 74  static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_A Line 74  static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_A
         {"RIPEMD320", "ripemd320", 25},          {"RIPEMD320", "ripemd320", 25},
         {NULL, NULL, 26}, /* support needs to be added for snefru 128 */          {NULL, NULL, 26}, /* support needs to be added for snefru 128 */
         {"SNEFRU256", "snefru256", 27},          {"SNEFRU256", "snefru256", 27},
        {"MD2", "md2", 28}        {"MD2", "md2", 28},
         {"FNV132", "fnv132", 29},
         {"FNV1A32", "fnv1a32", 30},
         {"FNV164", "fnv164", 31},
         {"FNV1A64", "fnv1a64", 32},
         {"JOAAT", "joaat", 33},
 };  };
 #endif  #endif
   
Line 136  static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMET Line 141  static void php_hash_do_hash(INTERNAL_FUNCTION_PARAMET
                 RETURN_FALSE;                  RETURN_FALSE;
         }          }
         if (isfilename) {          if (isfilename) {
                stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, DEFAULT_CONTEXT);                if (CHECK_NULL_PATH(data, data_len)) {
                         RETURN_FALSE;
                 }
                 stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS, NULL, DEFAULT_CONTEXT);
                 if (!stream) {                  if (!stream) {
                         /* Stream will report errors opening file */                          /* Stream will report errors opening file */
                         RETURN_FALSE;                          RETURN_FALSE;
Line 214  static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PA Line 222  static void php_hash_do_hash_hmac(INTERNAL_FUNCTION_PA
                 RETURN_FALSE;                  RETURN_FALSE;
         }          }
         if (isfilename) {          if (isfilename) {
                stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, DEFAULT_CONTEXT);                stream = php_stream_open_wrapper_ex(data, "rb", REPORT_ERRORS, NULL, DEFAULT_CONTEXT);
                 if (!stream) {                  if (!stream) {
                         /* Stream will report errors opening file */                          /* Stream will report errors opening file */
                         RETURN_FALSE;                          RETURN_FALSE;
Line 448  PHP_FUNCTION(hash_update_file) Line 456  PHP_FUNCTION(hash_update_file)
         ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, php_hash_le_hash);          ZEND_FETCH_RESOURCE(hash, php_hash_data*, &zhash, -1, PHP_HASH_RESNAME, php_hash_le_hash);
         context = php_stream_context_from_zval(zcontext, 0);          context = php_stream_context_from_zval(zcontext, 0);
   
        stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS | ENFORCE_SAFE_MODE, NULL, context);        stream = php_stream_open_wrapper_ex(filename, "rb", REPORT_ERRORS, NULL, context);
         if (!stream) {          if (!stream) {
                 /* Stream will report errors opening file */                  /* Stream will report errors opening file */
                 RETURN_FALSE;                  RETURN_FALSE;
Line 843  PHP_MINIT_FUNCTION(hash) Line 851  PHP_MINIT_FUNCTION(hash)
         php_hash_register_algo("adler32",               &php_hash_adler32_ops);          php_hash_register_algo("adler32",               &php_hash_adler32_ops);
         php_hash_register_algo("crc32",                 &php_hash_crc32_ops);          php_hash_register_algo("crc32",                 &php_hash_crc32_ops);
         php_hash_register_algo("crc32b",                &php_hash_crc32b_ops);          php_hash_register_algo("crc32b",                &php_hash_crc32b_ops);
        php_hash_register_algo("salsa10",              &php_hash_salsa10_ops);        php_hash_register_algo("fnv132",              &php_hash_fnv132_ops);
        php_hash_register_algo("salsa20",              &php_hash_salsa20_ops);        php_hash_register_algo("fnv164",              &php_hash_fnv164_ops);
         php_hash_register_algo("joaat",                 &php_hash_joaat_ops);
   
         PHP_HASH_HAVAL_REGISTER(3,128);          PHP_HASH_HAVAL_REGISTER(3,128);
         PHP_HASH_HAVAL_REGISTER(3,160);          PHP_HASH_HAVAL_REGISTER(3,160);

Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>