Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/libbb/hash_md5prime.c

    r2725 r3232  
    6060 *
    6161 * Reintroduced the loop unrolling in md5_transform and added the
    62  * MD5_SIZE_VS_SPEED option for configurability.  Define below as:
     62 * MD5_SMALL option for configurability.  Define below as:
    6363 *       0    fully unrolled loops
    6464 *       1    partially unrolled (4 ops per loop)
     
    7676
    7777/* 1: fastest, 3: smallest */
    78 #if CONFIG_MD5_SIZE_VS_SPEED < 1
    79 # define MD5_SIZE_VS_SPEED 1
    80 #elif CONFIG_MD5_SIZE_VS_SPEED > 3
    81 # define MD5_SIZE_VS_SPEED 3
     78#if CONFIG_MD5_SMALL < 1
     79# define MD5_SMALL 1
     80#elif CONFIG_MD5_SMALL > 3
     81# define MD5_SMALL 3
    8282#else
    83 # define MD5_SIZE_VS_SPEED CONFIG_MD5_SIZE_VS_SPEED
     83# define MD5_SMALL CONFIG_MD5_SMALL
    8484#endif
    8585
     
    153153{
    154154    uint32_t a, b, c, d, x[16];
    155 #if MD5_SIZE_VS_SPEED > 1
     155#if MD5_SMALL > 1
    156156    uint32_t temp;
    157157    const unsigned char *ps;
     
    163163        6, 10, 15, 21
    164164    };
    165 #endif /* MD5_SIZE_VS_SPEED > 1 */
    166 
    167 #if MD5_SIZE_VS_SPEED > 0
     165#endif /* MD5_SMALL > 1 */
     166
     167#if MD5_SMALL > 0
    168168    const uint32_t *pc;
    169169    const unsigned char *pp;
     
    199199    };
    200200
    201 #endif /* MD5_SIZE_VS_SPEED > 0 */
     201#endif /* MD5_SMALL > 0 */
    202202
    203203    memcpy32_le2cpu(x, block, 64);
     
    208208    d = state[3];
    209209
    210 #if MD5_SIZE_VS_SPEED > 2
     210#if MD5_SMALL > 2
    211211    pc = C;
    212212    pp = P;
     
    234234        a = d; d = c; c = b; b = temp;
    235235    }
    236 #elif MD5_SIZE_VS_SPEED > 1
     236#elif MD5_SMALL > 1
    237237    pc = C;
    238238    pp = P;
     
    261261        temp = d; d = c; c = b; b = a; a = temp;
    262262    }
    263 #elif MD5_SIZE_VS_SPEED > 0
     263#elif MD5_SMALL > 0
    264264    pc = C;
    265265    pp = P;
Note: See TracChangeset for help on using the changeset viewer.