MCPcopy Create free account
hub / github.com/MapServer/MapServer / encipher

Function encipher

mapcrypto.c:88–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 **********************************************************************/
87
88static void encipher(const ms_uint32 *const v, ms_uint32 *const w,
89 const ms_uint32 *const k)
90{
91 register ms_uint32 y=v[0],z=v[1],sum=0,delta=0x9E3779B9,n=32;
92
93 while(n-->0)
94 {
95 y += ((z << 4 ^ z >> 5) + z) ^ (sum + k[sum&3]);
96 sum += delta;
97 z += ((y << 4 ^ y >> 5) + y) ^ (sum + k[sum>>11 & 3]);
98 }
99
100 w[0]=y; w[1]=z;
101}
102
103static void decipher(const ms_uint32 *const v, ms_uint32 *const w,
104 const ms_uint32 *const k)

Callers 1

msEncryptStringWithKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected