33 #define uint32 uint32_t 46 return (X & Y) | ((~X) & Z);
52 return (X & Y) | (X & Z) | (Y & Z);
65 return ((x << s) & 0xFFFFFFFF) | (x >> (32 - s));
68 #define ROUND1(a, b, c, d, k, s) a = lshift (a + F (b, c, d) + X[k], s) 69 #define ROUND2(a, b, c, d, k, s) \ 70 a = lshift (a + G (b, c, d) + X[k] + (uint32) 0x5A827999, s) 71 #define ROUND3(a, b, c, d, k, s) \ 72 a = lshift (a + H (b, c, d) + X[k] + (uint32) 0x6ED9EBA1, s) 82 for (j = 0; j < 16; j++)
150 memset (X,
'\0',
sizeof (X));
158 for (i = 0; i < 16; i++)
159 M[i] = (in[i * 4 + 3] << 24) | (in[i * 4 + 2] << 16) | (in[i * 4 + 1] << 8)
160 | (in[i * 4 + 0] << 0);
167 out[1] = (x >> 8) & 0xFF;
168 out[2] = (x >> 16) & 0xFF;
169 out[3] = (x >> 24) & 0xFF;
176 unsigned char buf[128];
194 for (i = 0; i < 128; i++)
214 for (i = 0; i < 128; i++)
static void copy4_ntlmssp(unsigned char *out, uint32 x)
static uint32 G(uint32 X, uint32 Y, uint32 Z)
#define ROUND2(a, b, c, d, k, s)
static uint32 F(uint32 X, uint32 Y, uint32 Z)
static uint32 H(uint32 X, uint32 Y, uint32 Z)
void mdfour_ntlmssp(unsigned char *out, const unsigned char *in, int n)
static void copy64_ntlmssp(uint32 *M, const unsigned char *in)
#define ROUND1(a, b, c, d, k, s)
static uint32 lshift(uint32 x, int s)
#define ROUND3(a, b, c, d, k, s)
static void mdfour64_ntlmssp(uint32 *M)
Unix SMB/CIFS implementation.