remove extra blank lines at end of files
[dpdk.git] / app / test / test_cryptodev_asym_util.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2018 Cavium Networks
3  */
4
5 #ifndef TEST_CRYPTODEV_ASYM_TEST_UTIL_H__
6 #define TEST_CRYPTODEV_ASYM_TEST_UTIL_H__
7
8 /* Below Apis compare resulted buffer to original test vector */
9
10 static inline int rsa_verify(struct rsa_test_data *rsa_param,
11                 struct rte_crypto_op *result_op)
12 {
13         if (memcmp(rsa_param->data,
14                                 result_op->asym->rsa.message.data,
15                                 result_op->asym->rsa.message.length))
16                 return -1;
17         return 0;
18 }
19
20 static inline int verify_modinv(uint8_t *mod_inv,
21                 struct rte_crypto_op *result_op)
22 {
23         if (memcmp(mod_inv, result_op->asym->modinv.result.data,
24                                 result_op->asym->modinv.result.length))
25                 return -1;
26         return 0;
27 }
28
29 static inline int verify_modexp(uint8_t *mod_exp,
30                 struct rte_crypto_op *result_op)
31 {
32         if (memcmp(mod_exp, result_op->asym->modex.result.data,
33                                 result_op->asym->modex.result.length))
34                 return -1;
35         return 0;
36 }
37
38 #endif /* TEST_CRYPTODEV_ASYM_TEST_UTIL_H__ */