<p></p>
<p><b>@fabian18</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/15150#discussion_r516865950">sys/net/link_layer/ieee802154/security.c</a>:</p>
<pre style='color:#555'>> +        _init_cbc_B0(&ccm, frame_counter, security_level, c_len, mac_size, src_address);
+        memset(tmp2, 0, sizeof(tmp2));
+        _cbc_next(ctx, tmp2, tmp1, (uint8_t *)&ccm, sizeof(ccm));
+        byteorder_htobebufs(tmp1, a_len);
+        off = _min(sizeof(tmp1) - sizeof(uint16_t), a_len);
+        memcpy(tmp1 + sizeof(uint16_t), a, off);
+        _cbc_next(ctx, tmp2, tmp1, tmp1, sizeof(uint16_t) + off);
+        for (;off < a_len;) {
+            off += _cbc_next(ctx, tmp2, tmp1, &a[off], a_len - off);
+        }
+        for (off = 0; off < c_len;) {
+            off += _cbc_next(ctx, tmp2, tmp1, &c[off], c_len - off);
+        }
</pre>
<p>Yes I could probably make it another function <code>_comp_mic()</code> or something like that.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/15150#discussion_r516865950">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYAB74LYDYO54TF4HRLSOBCHXANCNFSM4SCQU3PA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYF5PONS5LJ6CAXFMLDSOBCHXA5CNFSM4SCQU3PKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOD4ULKUI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/15150#discussion_r516865950",
"url": "https://github.com/RIOT-OS/RIOT/pull/15150#discussion_r516865950",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>