xref: /OK3568_Linux_fs/external/security/librkcrypto/test/test_utils.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2022 Rockchip Electronics Co. Ltd.
3  */
4 #ifndef _TEST_UTILS_H_
5 #define _TEST_UTILS_H_
6 
7 #include <stdint.h>
8 #include <stdbool.h>
9 
10 #ifndef ARRAY_SIZE
11 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
12 #endif
13 
14 bool is_no_multi_blocksize(uint32_t mode);
15 
16 void test_get_rng(uint8_t *trn, uint32_t len);
17 void test_dump_hex(char *var_name, const uint8_t *data, uint32_t len);
18 const char *test_algo_name(uint32_t algo);
19 const char *test_mode_name(uint32_t mode);
20 const char *test_op_name(uint32_t operation);
21 
22 #endif
23 
24