Lines Matching refs:bs
47 int bs = crypto_hash_blocksize(parent);
50 char *opad = ipad + bs;
51 char *digest = opad + bs;
56 if (keylen > bs) {
75 memset(ipad + keylen, 0, bs - keylen);
76 memcpy(opad, ipad, bs);
78 for (i = 0; i < bs; i++) {
89 int bs = crypto_hash_blocksize(parent);
92 struct hmac_ctx *ctx = align_ptr(ipad + bs * 2 + ds, sizeof(void *));
99 sg_set_buf(&tmp, ipad, bs);
105 return crypto_hash_update(&desc, &tmp, bs);
123 int bs = crypto_hash_blocksize(parent);
125 char *opad = crypto_hash_ctx_aligned(parent) + bs;
126 char *digest = opad + bs;
134 sg_set_buf(&tmp, opad, bs + ds);
140 return crypto_hash_digest(&desc, &tmp, bs + ds, out);
147 int bs = crypto_hash_blocksize(parent);
150 char *opad = ipad + bs;
151 char *digest = opad + bs;
161 sg_set_buf(sg1, ipad, bs);
164 sg_set_buf(sg2, opad, bs + ds);
166 err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest);
170 return crypto_hash_digest(&desc, sg2, bs + ds, out);