pike.git / src / post_modules / Nettle / idea.c

version» Context lines:

pike.git/src/post_modules/Nettle/idea.c:24:    *    * Extensively optimized and restructured by Colin Plumb.    *    ***********************************************************************    *    * Some changes including endianness cleanup done by Niels Möller.    *    */      #include "global.h" - #include <string.h> -  +    #include "idea.h"      /*-------------------------------------------------------------*/      #define low16(x) ((x) & 0xffff)      /*    * Multiplication, modulo (2**16)+1    * Note that this code is structured on the assumption that    * untaken branches are cheaper than taken branches, and the
pike.git/src/post_modules/Nettle/idea.c:163:    *--p = t1;       t1 = inv(*e++);    t2 = -*e++;    t3 = -*e++;    *--p = inv(*e++);    *--p = t3;    *--p = t2;    *--p = t1;    /* Copy and destroy temp copy */ -  MEMCPY(d, temp, sizeof(temp)); +  memcpy(d, temp, sizeof(temp));    memset(temp, 0, sizeof(temp));   } /* idea_invert */      /*    * MUL(x,y) computes x = x*y, modulo 0x10001. Requires two temps,    * t16 and t32. x is modified, and must me a side-effect-free lvalue.    * y may be anything, but unlike x, must be strictly 16 bits even if    * low16() is #defined.    * All of these are equivalent - see which is faster on your machine    */