Home | History | Annotate | Download | only in sha2

Lines Matching refs:sha512

14    @param sha512.c
15 SHA512 by Tom St Denis
18 #ifdef SHA512
22 "sha512",
104 S[i] = md->sha512.state[i];
153 md->sha512.state[i] = md->sha512.state[i] + S[i];
178 md->sha512.curlen = 0;
179 md->sha512.length = 0;
180 md->sha512.state[0] = CONST64(0x6a09e667f3bcc908);
181 md->sha512.state[1] = CONST64(0xbb67ae8584caa73b);
182 md->sha512.state[2] = CONST64(0x3c6ef372fe94f82b);
183 md->sha512.state[3] = CONST64(0xa54ff53a5f1d36f1);
184 md->sha512.state[4] = CONST64(0x510e527fade682d1);
185 md->sha512.state[5] = CONST64(0x9b05688c2b3e6c1f);
186 md->sha512.state[6] = CONST64(0x1f83d9abfb41bd6b);
187 md->sha512.state[7] = CONST64(0x5be0cd19137e2179);
198 HASH_PROCESS(sha512_process, sha512_compress, sha512, 128)
213 if (md->sha512.curlen >= sizeof(md->sha512.buf)) {
218 md->sha512.length += md->sha512.curlen * CONST64(8);
221 md->sha512.buf[md->sha512.curlen++] = (unsigned char)0x80;
227 if (md->sha512.curlen > 112) {
228 while (md->sha512.curlen < 128) {
229 md->sha512.buf[md->sha512.curlen++] = (unsigned char)0;
231 sha512_compress(md, md->sha512.buf);
232 md->sha512.curlen = 0;
239 while (md->sha512.curlen < 120) {
240 md->sha512.buf[md->sha512.curlen++] = (unsigned char)0;
244 STORE64H(md->sha512.length, md->sha512.buf+120);
245 sha512_compress(md, md->sha512.buf);
249 STORE64H(md->sha512.state[i], out+(8*i));
317 /* $Source: /cvs/libtom/libtomcrypt/src/hashes/sha2/sha512.c,v $ */