diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2019-07-03 09:04:54 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-02-18 22:55:24 +0000 |
commit | a9075dcf65c14f1269faad4ba0e2ed9b06dd3140 (patch) | |
tree | 53557a600ff1224724f7cf37ea43c9c980f5627b /src/plugins/unittest/crypto/rfc2202_hmac_sha1.c | |
parent | dd398c6c5cbf388e912de33dbe63a441fa1e0886 (diff) |
crypto: add support for testing quad loops in crypto algos
This patch adds support for test cases with arbitrary long plaintext.
Type: feature
Change-Id: I48cd3642e30cc49eabc196c45d7f73c484e93057
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'src/plugins/unittest/crypto/rfc2202_hmac_sha1.c')
-rw-r--r-- | src/plugins/unittest/crypto/rfc2202_hmac_sha1.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c b/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c index d009afe6af7..2513c5ebad2 100644 --- a/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c +++ b/src/plugins/unittest/crypto/rfc2202_hmac_sha1.c @@ -216,9 +216,7 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc7) = { .plaintext = TEST_DATA (sha1_tc7_data), .digest = TEST_DATA (sha1_tc7_digest), }; -/* *INDENT-ON* */ -/* *INDENT-OFF* */ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc7_chained) = { .name = "RFC2202 HMAC-SHA-1 TC7 [chained]", .alg = VNET_CRYPTO_ALG_HMAC_SHA1, @@ -231,6 +229,14 @@ UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc7_chained) = { TEST_DATA_CHUNK (sha1_tc7_data, 40, 33) }, }; + +UNITTEST_REGISTER_CRYPTO_TEST (rfc_2202_sha1_tc7_inc) = { + .name = "HMAC-SHA-1 incremental (1024 B)", + .alg = VNET_CRYPTO_ALG_HMAC_SHA1, + .plaintext_incremental = 1024, + .key.length = 80, + .digest.length = 12, +}; /* *INDENT-ON* */ /* |