• Home
  • Raw
  • Download

Lines Matching refs:md

57 static int _whirlpool_compress(hash_state *md, unsigned char *buf)  in _whirlpool_compress()  argument
59 static int whirlpool_compress(hash_state *md, unsigned char *buf) in _whirlpool_compress()
67 K[0][x] = md->whirlpool.state[x]; in _whirlpool_compress()
105 md->whirlpool.state[x] ^= T[0][x] ^ T[2][x]; in _whirlpool_compress()
113 static int whirlpool_compress(hash_state *md, unsigned char *buf) in whirlpool_compress() argument
116 err = _whirlpool_compress(md, buf); in whirlpool_compress()
128 int whirlpool_init(hash_state * md) in whirlpool_init() argument
130 LTC_ARGCHK(md != NULL); in whirlpool_init()
131 zeromem(&md->whirlpool, sizeof(md->whirlpool)); in whirlpool_init()
150 int whirlpool_done(hash_state * md, unsigned char *out) in whirlpool_done() argument
154 LTC_ARGCHK(md != NULL); in whirlpool_done()
157 if (md->whirlpool.curlen >= sizeof(md->whirlpool.buf)) { in whirlpool_done()
162 md->whirlpool.length += md->whirlpool.curlen * 8; in whirlpool_done()
165 md->whirlpool.buf[md->whirlpool.curlen++] = (unsigned char)0x80; in whirlpool_done()
171 if (md->whirlpool.curlen > 32) { in whirlpool_done()
172 while (md->whirlpool.curlen < 64) { in whirlpool_done()
173 md->whirlpool.buf[md->whirlpool.curlen++] = (unsigned char)0; in whirlpool_done()
175 whirlpool_compress(md, md->whirlpool.buf); in whirlpool_done()
176 md->whirlpool.curlen = 0; in whirlpool_done()
180 while (md->whirlpool.curlen < 56) { in whirlpool_done()
181 md->whirlpool.buf[md->whirlpool.curlen++] = (unsigned char)0; in whirlpool_done()
185 STORE64H(md->whirlpool.length, md->whirlpool.buf+56); in whirlpool_done()
186 whirlpool_compress(md, md->whirlpool.buf); in whirlpool_done()
190 STORE64H(md->whirlpool.state[i], out+(8*i)); in whirlpool_done()
193 zeromem(md, sizeof(*md)); in whirlpool_done()
287 hash_state md; in whirlpool_test()
290 whirlpool_init(&md); in whirlpool_test()
291 whirlpool_process(&md, (unsigned char *)tests[i].msg, tests[i].len); in whirlpool_test()
292 whirlpool_done(&md, tmp); in whirlpool_test()