-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathaes-print-block.h
34 lines (27 loc) · 903 Bytes
/
aes-print-block.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*****************************************************************************
* aes-print-block.h
****************************************************************************/
#ifndef AES_PRINT_BLOCK_H
#define AES_PRINT_BLOCK_H
/*****************************************************************************
* Includes
****************************************************************************/
#include <stdint.h>
#include <stdio.h>
/*****************************************************************************
* Inline functions
****************************************************************************/
static inline void print_block_hex(const uint8_t * p_block, size_t len)
{
while (len > 1)
{
printf("%02X ", *p_block++);
len--;
}
if (len)
{
printf("%02X", *p_block);
}
printf("\n");
}
#endif /* !defined(AES_PRINT_BLOCK_H) */