Home | History | Annotate | Download | only in sha2

Lines Matching refs:usedspace

519 	unsigned int	freespace, usedspace;
529 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
530 if (usedspace > 0) {
532 freespace = SHA256_BLOCK_LENGTH - usedspace;
536 bcopy(data, &context->buffer[usedspace], freespace);
543 bcopy(data, &context->buffer[usedspace], len);
546 usedspace = freespace = 0;
563 usedspace = freespace = 0;
568 unsigned int usedspace;
575 usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
580 if (usedspace > 0) {
582 context->buffer[usedspace++] = 0x80;
584 if (usedspace <= SHA256_SHORT_BLOCK_LENGTH) {
586 bzero(&context->buffer[usedspace], SHA256_SHORT_BLOCK_LENGTH - usedspace);
588 if (usedspace < SHA256_BLOCK_LENGTH) {
589 bzero(&context->buffer[usedspace], SHA256_BLOCK_LENGTH - usedspace);
626 usedspace = 0;
841 unsigned int freespace, usedspace;
851 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
852 if (usedspace > 0) {
854 freespace = SHA512_BLOCK_LENGTH - usedspace;
858 bcopy(data, &context->buffer[usedspace], freespace);
865 bcopy(data, &context->buffer[usedspace], len);
868 usedspace = freespace = 0;
885 usedspace = freespace = 0;
889 unsigned int usedspace;
891 usedspace = (context->bitcount[0] >> 3) % SHA512_BLOCK_LENGTH;
897 if (usedspace > 0) {
899 context->buffer[usedspace++] = 0x80;
901 if (usedspace <= SHA512_SHORT_BLOCK_LENGTH) {
903 bzero(&context->buffer[usedspace], SHA512_SHORT_BLOCK_LENGTH - usedspace);
905 if (usedspace < SHA512_BLOCK_LENGTH) {
906 bzero(&context->buffer[usedspace], SHA512_BLOCK_LENGTH - usedspace);