Lines Matching refs:buf

6 void ossl_quic_vlint_encode_n(uint8_t *buf, uint64_t v, int n)  in ossl_quic_vlint_encode_n()  argument
9 buf[0] = (uint8_t)v; in ossl_quic_vlint_encode_n()
11 buf[0] = (uint8_t)(0x40 | ((v >> 8) & 0x3F)); in ossl_quic_vlint_encode_n()
12 buf[1] = (uint8_t)v; in ossl_quic_vlint_encode_n()
14 buf[0] = (uint8_t)(0x80 | ((v >> 24) & 0x3F)); in ossl_quic_vlint_encode_n()
15 buf[1] = (uint8_t)(v >> 16); in ossl_quic_vlint_encode_n()
16 buf[2] = (uint8_t)(v >> 8); in ossl_quic_vlint_encode_n()
17 buf[3] = (uint8_t)v; in ossl_quic_vlint_encode_n()
19 buf[0] = (uint8_t)(0xC0 | ((v >> 56) & 0x3F)); in ossl_quic_vlint_encode_n()
20 buf[1] = (uint8_t)(v >> 48); in ossl_quic_vlint_encode_n()
21 buf[2] = (uint8_t)(v >> 40); in ossl_quic_vlint_encode_n()
22 buf[3] = (uint8_t)(v >> 32); in ossl_quic_vlint_encode_n()
23 buf[4] = (uint8_t)(v >> 24); in ossl_quic_vlint_encode_n()
24 buf[5] = (uint8_t)(v >> 16); in ossl_quic_vlint_encode_n()
25 buf[6] = (uint8_t)(v >> 8); in ossl_quic_vlint_encode_n()
26 buf[7] = (uint8_t)v; in ossl_quic_vlint_encode_n()
30 void ossl_quic_vlint_encode(uint8_t *buf, uint64_t v) in ossl_quic_vlint_encode() argument
32 ossl_quic_vlint_encode_n(buf, v, ossl_quic_vlint_encode_len(v)); in ossl_quic_vlint_encode()
35 uint64_t ossl_quic_vlint_decode_unchecked(const unsigned char *buf) in ossl_quic_vlint_decode_unchecked() argument
37 uint8_t first_byte = buf[0]; in ossl_quic_vlint_decode_unchecked()
45 | buf[1]; in ossl_quic_vlint_decode_unchecked()
49 | ((uint64_t)buf[1] << 16) in ossl_quic_vlint_decode_unchecked()
50 | ((uint64_t)buf[2] << 8) in ossl_quic_vlint_decode_unchecked()
51 | buf[3]; in ossl_quic_vlint_decode_unchecked()
54 | ((uint64_t)buf[1] << 48) in ossl_quic_vlint_decode_unchecked()
55 | ((uint64_t)buf[2] << 40) in ossl_quic_vlint_decode_unchecked()
56 | ((uint64_t)buf[3] << 32) in ossl_quic_vlint_decode_unchecked()
57 | ((uint64_t)buf[4] << 24) in ossl_quic_vlint_decode_unchecked()
58 | ((uint64_t)buf[5] << 16) in ossl_quic_vlint_decode_unchecked()
59 | ((uint64_t)buf[6] << 8) in ossl_quic_vlint_decode_unchecked()
60 | buf[7]; in ossl_quic_vlint_decode_unchecked()
63 int ossl_quic_vlint_decode(const unsigned char *buf, size_t buf_len, uint64_t *v) in ossl_quic_vlint_decode() argument
71 dec_len = ossl_quic_vlint_decode_len(buf[0]); in ossl_quic_vlint_decode()
75 x = ossl_quic_vlint_decode_unchecked(buf); in ossl_quic_vlint_decode()