FD.io VPP  v20.01-48-g3e0dafb74
Vector Packet Processing
crypto.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 
17 #ifndef included_unittest_crypto_crypto_h
18 #define included_unittest_crypto_crypto_h
19 
20 typedef struct
21 {
23  u8 *data;
25 
27 {
28  char *name;
31  tag;
32 
33  /* next */
36 
37 
38 typedef struct
39 {
40  int verbose;
41 
42  /* perf */
48 
51 
53 
54 #define TEST_DATA(n) { .data = (u8 *) n, .length = sizeof (n)}
55 
56 #define UNITTEST_REGISTER_CRYPTO_TEST(x) \
57  unittest_crypto_test_registration_t __unittest_crypto_test_##x; \
58 static void __clib_constructor \
59 __unittest_crypto_test_registration_##x (void) \
60 { \
61  crypto_test_main_t * cm = &crypto_test_main; \
62  __unittest_crypto_test_##x.next = cm->test_registrations; \
63  cm->test_registrations = & __unittest_crypto_test_##x; \
64 } \
65 unittest_crypto_test_registration_t __unittest_crypto_test_##x
66 
67 #endif
68 
69 /*
70  * fd.io coding-style-patch-verification: ON
71  *
72  * Local Variables:
73  * eval: (c-set-style "gnu")
74  * End:
75  */
unittest_crypto_test_data_t aad
Definition: crypto.h:30
unittest_crypto_test_data_t iv
Definition: crypto.h:30
unsigned char u8
Definition: types.h:56
unittest_crypto_test_data_t plaintext
Definition: crypto.h:30
struct unittest_crypto_test_registration unittest_crypto_test_registration_t
unsigned int u32
Definition: types.h:88
vnet_crypto_alg_t
Definition: crypto.h:86
unittest_crypto_test_registration_t * test_registrations
Definition: crypto.h:49
crypto_test_main_t crypto_test_main
vnet_crypto_alg_t alg
Definition: crypto.h:29
unittest_crypto_test_data_t ciphertext
Definition: crypto.h:30
vnet_crypto_alg_t alg
Definition: crypto.h:43
unittest_crypto_test_data_t tag
Definition: crypto.h:30
unittest_crypto_test_data_t digest
Definition: crypto.h:30
struct unittest_crypto_test_registration * next
Definition: crypto.h:34
unittest_crypto_test_data_t key
Definition: crypto.h:30