データ構造 | |
struct | mdfour |
関数 | |
void | mdfour_begin (struct mdfour *md) |
void | mdfour_update (struct mdfour *md, unsigned char *in, uint32 n) |
void | mdfour_result (struct mdfour *md, unsigned char *out) |
void | mdfour (unsigned char *out, unsigned char *in, int n) |
void mdfour_begin | ( | struct mdfour * | md | ) |
参照先 mdfour::A・mdfour::B・mdfour::C・mdfour::D・md・mdfour::totalN・mdfour::totalN2.
参照元 file_checksum()・file_checksum1()・get_checksum2()・mdfour()・sum_init().
00106 { 00107 md->A = 0x67452301; 00108 md->B = 0xefcdab89; 00109 md->C = 0x98badcfe; 00110 md->D = 0x10325476; 00111 md->totalN = 0; 00112 md->totalN2 = 0; 00113 }
void mdfour_update | ( | struct mdfour * | md, | |
unsigned char * | in, | |||
uint32 | n | |||
) |
参照先 copy64()・m・md・mdfour64()・mdfour_tail()・mdfour::totalN・mdfour::totalN2.
参照元 file_checksum()・file_checksum1()・get_checksum2()・mdfour()・sum_end()・sum_update().
00167 { 00168 uint32 M[16]; 00169 00170 m = md; 00171 00172 if (n == 0) mdfour_tail(in, n); 00173 00174 while (n >= 64) { 00175 copy64(M, in); 00176 mdfour64(M); 00177 in += 64; 00178 n -= 64; 00179 m->totalN += 64 << 3; 00180 if (m->totalN < 64 << 3) { 00181 m->totalN2++; 00182 } 00183 } 00184 00185 if (n) mdfour_tail(in, n); 00186 }
void mdfour_result | ( | struct mdfour * | md, | |
unsigned char * | out | |||
) |
void mdfour | ( | unsigned char * | out, | |
unsigned char * | in, | |||
int | n | |||
) |
参照先 md・mdfour_begin()・mdfour_result()・mdfour_update().
00201 { 00202 struct mdfour md; 00203 mdfour_begin(&md); 00204 mdfour_update(&md, in, n); 00205 mdfour_result(&md, out); 00206 }