Lines Matching refs:res
107 size_t res; in sha1_update() local
109 if ((res = c->num)) { in sha1_update()
110 res = SHA_CBLOCK - res; in sha1_update()
111 if (len < res) in sha1_update()
112 res = len; in sha1_update()
113 SHA1_Update(c, ptr, res); in sha1_update()
114 ptr += res; in sha1_update()
115 len -= res; in sha1_update()
118 res = len % SHA_CBLOCK; in sha1_update()
119 len -= res; in sha1_update()
131 if (res) in sha1_update()
132 SHA1_Update(c, ptr, res); in sha1_update()
491 unsigned int res, maxpad, pad, bitlen; in aesni_cbc_hmac_sha1_cipher() local
614 for (res = key->md.num, j = 0; j < len; j++) { in aesni_cbc_hmac_sha1_cipher()
619 data->c[res++] = (unsigned char)c; in aesni_cbc_hmac_sha1_cipher()
621 if (res != SHA_CBLOCK) in aesni_cbc_hmac_sha1_cipher()
634 res = 0; in aesni_cbc_hmac_sha1_cipher()
637 for (i = res; i < SHA_CBLOCK; i++, j++) in aesni_cbc_hmac_sha1_cipher()
640 if (res > SHA_CBLOCK - 8) { in aesni_cbc_hmac_sha1_cipher()
671 res = pmac->u[i]; in aesni_cbc_hmac_sha1_cipher()
672 pmac->c[4 * i + 0] = (unsigned char)(res >> 24); in aesni_cbc_hmac_sha1_cipher()
673 pmac->c[4 * i + 1] = (unsigned char)(res >> 16); in aesni_cbc_hmac_sha1_cipher()
674 pmac->c[4 * i + 2] = (unsigned char)(res >> 8); in aesni_cbc_hmac_sha1_cipher()
675 pmac->c[4 * i + 3] = (unsigned char)res; in aesni_cbc_hmac_sha1_cipher()
681 res = key->md.num; in aesni_cbc_hmac_sha1_cipher()
689 1 + ((SHA_CBLOCK - 9 - res) >> (sizeof(res) * 8 - 1)); in aesni_cbc_hmac_sha1_cipher()
690 res += (unsigned int)(len - inp_len); in aesni_cbc_hmac_sha1_cipher()
691 pad_blocks = res / SHA_CBLOCK; in aesni_cbc_hmac_sha1_cipher()
692 res %= SHA_CBLOCK; in aesni_cbc_hmac_sha1_cipher()
694 1 + ((SHA_CBLOCK - 9 - res) >> (sizeof(res) * 8 - 1)); in aesni_cbc_hmac_sha1_cipher()
712 for (res = 0, i = 0, j = 0; j < maxpad + SHA_DIGEST_LENGTH; j++) { in aesni_cbc_hmac_sha1_cipher()
717 res |= (c ^ pad) & ~cmask; /* ... and padding */ in aesni_cbc_hmac_sha1_cipher()
719 res |= (c ^ pmac->c[i]) & cmask; in aesni_cbc_hmac_sha1_cipher()
723 res = 0 - ((0 - res) >> (sizeof(res) * 8 - 1)); in aesni_cbc_hmac_sha1_cipher()
724 ret &= (int)~res; in aesni_cbc_hmac_sha1_cipher()
727 for (res = 0, i = 0; i < SHA_DIGEST_LENGTH; i++) in aesni_cbc_hmac_sha1_cipher()
728 res |= out[i] ^ pmac->c[i]; in aesni_cbc_hmac_sha1_cipher()
729 res = 0 - ((0 - res) >> (sizeof(res) * 8 - 1)); in aesni_cbc_hmac_sha1_cipher()
730 ret &= (int)~res; in aesni_cbc_hmac_sha1_cipher()
733 pad = (pad & ~res) | (maxpad & res); in aesni_cbc_hmac_sha1_cipher()
735 for (res = 0, i = 0; i < pad; i++) in aesni_cbc_hmac_sha1_cipher()
736 res |= out[i] ^ pad; in aesni_cbc_hmac_sha1_cipher()
738 res = (0 - res) >> (sizeof(res) * 8 - 1); in aesni_cbc_hmac_sha1_cipher()
739 ret &= (int)~res; in aesni_cbc_hmac_sha1_cipher()