* Put value at the end of block, starting at offset. * (This goes backwards, putting bytes in *until* it * reaches offset.) */
| 70 | * reaches offset.) |
| 71 | */ |
| 72 | static void |
| 73 | append_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. |
no outgoing calls
no test coverage detected