Lines Matching refs:bytes
101 u_int bits, bytes; in buffer_get_bignum_ret() local
111 bytes = (bits + 7) / 8; in buffer_get_bignum_ret()
112 if (bytes > 8 * 1024) { in buffer_get_bignum_ret()
113 error("buffer_get_bignum_ret: cannot handle BN of size %d", bytes); in buffer_get_bignum_ret()
116 if (buffer_len(buffer) < bytes) { in buffer_get_bignum_ret()
121 BN_bin2bn(bin, bytes, value); in buffer_get_bignum_ret()
122 if (buffer_consume_ret(buffer, bytes) == -1) { in buffer_get_bignum_ret()
142 u_int bytes; in buffer_put_bignum2_ret() local
155 bytes = BN_num_bytes(value) + 1; /* extra padding byte */ in buffer_put_bignum2_ret()
156 if (bytes < 2) { in buffer_put_bignum2_ret()
160 buf = xmalloc(bytes); in buffer_put_bignum2_ret()
164 if (oi < 0 || (u_int)oi != bytes - 1) { in buffer_put_bignum2_ret()
166 "oi %d != bin_size %d", oi, bytes); in buffer_put_bignum2_ret()
171 buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh); in buffer_put_bignum2_ret()
172 memset(buf, 0, bytes); in buffer_put_bignum2_ret()