MCPcopy Create free account
hub / github.com/F-Stack/f-stack / append_int

Function append_int

freebsd/crypto/aesni/aesni_ccm.c:72–83  ·  view source on GitHub ↗

* Put value at the end of block, starting at offset. * (This goes backwards, putting bytes in *until* it * reaches offset.) */

Source from the content-addressed store, hash-verified

70 * reaches offset.)
71 */
72static void
73append_int(size_t value, __m128i *block, size_t offset)
74{
75 int indx = sizeof(*block) - 1;
76 uint8_t *bp = (uint8_t*)block;
77
78 while (indx > (sizeof(*block) - offset)) {
79 bp[indx] = value & 0xff;
80 indx--;
81 value >>= 8;
82 }
83}
84
85/*
86 * Start the CBC-MAC process. This handles the auth data.

Callers 3

cbc_mac_startFunction · 0.85
AES_CCM_encryptFunction · 0.85
decrypt_loopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected