mdfour.h

ソースコードを見る。


データ構造

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.c105 行で定義されています。

参照先 mdfour::Amdfour::Bmdfour::Cmdfour::Dmdmdfour::totalNmdfour::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 
)

mdfour.c166 行で定義されています。

参照先 copy64()mmdmdfour64()mdfour_tail()mdfour::totalNmdfour::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 
)

mdfour.c189 行で定義されています。

参照先 mdfour::Amdfour::Bmdfour::Ccopy4()mdfour::Dmmd.

参照元 file_checksum()file_checksum1()get_checksum2()mdfour()sum_end().

00190 {
00191         m = md;
00192 
00193         copy4(out, m->A);
00194         copy4(out+4, m->B);
00195         copy4(out+8, m->C);
00196         copy4(out+12, m->D);
00197 }

void mdfour ( unsigned char *  out,
unsigned char *  in,
int  n 
)

mdfour.c200 行で定義されています。

参照先 mdmdfour_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 }


rsyncに対してSat Dec 5 19:45:44 2009に生成されました。  doxygen 1.4.7