Home | History | Annotate | Download | only in crypto

Lines Matching refs:buf

32 	u8 *buf;
46 buf = os_malloc(buf_len);
47 if (buf == NULL)
50 os_memset(buf, 0, 15);
52 buf[15] = 0;
53 os_memcpy(buf + 16, nonce, nonce_len);
54 if (omac1_aes_128(key, buf, 16 + nonce_len, nonce_mac))
57 buf[15] = 1;
58 os_memcpy(buf + 16, hdr, hdr_len);
59 if (omac1_aes_128(key, buf, 16 + hdr_len, hdr_mac))
64 buf[15] = 2;
65 os_memcpy(buf + 16, data, data_len);
66 if (omac1_aes_128(key, buf, 16 + data_len, data_mac))
74 bin_clear_free(buf, buf_len);
96 u8 *buf;
110 buf = os_malloc(buf_len);
111 if (buf == NULL)
114 os_memset(buf, 0, 15);
116 buf[15] = 0;
117 os_memcpy(buf + 16, nonce, nonce_len);
118 if (omac1_aes_128(key, buf, 16 + nonce_len, nonce_mac)) {
119 os_free(buf);
123 buf[15] = 1;
124 os_memcpy(buf + 16, hdr, hdr_len);
125 if (omac1_aes_128(key, buf, 16 + hdr_len, hdr_mac)) {
126 os_free(buf);
130 buf[15] = 2;
131 os_memcpy(buf + 16, data, data_len);
132 if (omac1_aes_128(key, buf, 16 + data_len, data_mac)) {
133 os_free(buf);
137 os_free(buf);