Lines Matching defs:bitstr
289 static ULNG shadirect(UCHR *bitstr, ULNG bitcnt, SHA *s)
294 s->sha(s, bitstr);
295 bitstr += (s->blocksize >> 3);
299 memcpy(s->block, bitstr, NBYTES(bitcnt));
306 static ULNG shabytes(UCHR *bitstr, ULNG bitcnt, SHA *s)
315 memcpy(s->block+offset, bitstr, nbits>>3);
317 bitstr += (nbits >> 3);
319 shadirect(bitstr, bitcnt, s);
322 memcpy(s->block+offset, bitstr, NBYTES(bitcnt));
329 static ULNG shabits(UCHR *bitstr, ULNG bitcnt, SHA *s)
342 s->block[s->blockcnt>>3] |= *bitstr >> (8 - gap);
352 buf[i] = bitstr[i] << gap | bitstr[i+1] >> (8-gap);
355 bitcnt -= nbits, bitstr += bufsize, nbytes -= bufsize;
358 buf[i] = bitstr[i] << gap | bitstr[i+1] >> (8-gap);
359 buf[nbytes-1] = bitstr[nbytes-1] << gap;
364 /* shawrite: triggers a state update using data in bitstr/bitcnt */
365 ULNG shawrite(UCHR *bitstr, ULNG bitcnt, SHA *s)
374 return(shadirect(bitstr, bitcnt, s));
376 return(shabytes(bitstr, bitcnt, s));
378 return(shabits(bitstr, bitcnt, s));