ipsec: add support for RFC-4543 ENCR_NULL_AUTH_AES_GMAC
[vpp.git] / src / plugins / unittest / crypto / crypto.h
index d95c994..90f75db 100644 (file)
@@ -31,6 +31,7 @@ typedef struct unittest_crypto_test_registration
   vnet_crypto_alg_t alg;
   unittest_crypto_test_data_t iv, key, digest, plaintext, ciphertext, aad,
     tag;
+  u32 plaintext_incremental;
   u8 is_chained;
 
   /* plaintext and cipher text data used for testing chained buffers */
@@ -45,6 +46,7 @@ typedef struct unittest_crypto_test_registration
 typedef struct
 {
   int verbose;
+  u8 *inc_data;
 
   /* perf */
   vnet_crypto_alg_t alg;
@@ -59,6 +61,10 @@ typedef struct
 extern crypto_test_main_t crypto_test_main;
 
 #define TEST_DATA(n) { .data = (u8 *) n, .length = sizeof (n)}
+#define TEST_DATA_STR(n)                                                      \
+  {                                                                           \
+    .data = (u8 *) n, .length = sizeof (n) - 1                                \
+  }
 #define TEST_DATA_CHUNK(s,off,n) { .data = (u8 *) s + off, .length = n}
 
 #define UNITTEST_REGISTER_CRYPTO_TEST(x)                                     \