test: init digests differently Chacha20-Poly1305 SGL test
To avoid a false positive test in Chacha20-Poly1305 SGL tests,
the two digests to compare (linear_digest and sgl_digest)
are initialized with different values.
@@ -572,6 +572,13 @@ test_sgl(struct IMB_MGR *mb_mgr,
goto exit;
}
+ /*
+ * Initialize tags with different values, to make sure the comparison
+ * is false if they are not updated by the library
+ */
+ memset(sgl_digest, 0, DIGEST_SZ);
+ memset(linear_digest, 0xFF, DIGEST_SZ);
+
generate_random_buf(in_buffer, buffer_sz);
generate_random_buf(key, KEY_SZ);
generate_random_buf(iv, IV_SZ);
