blob: 4f59578209f20aa31880f19a8fed5731d13157a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* Copyright (c) 2021-2023, Nokia
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef CRYPTO_OP_TEST_H
#define CRYPTO_OP_TEST_H
#include <odp_api.h>
#include <stdint.h>
#include "test_vectors.h"
typedef struct crypto_session_t {
odp_crypto_session_t session;
odp_crypto_op_t op;
odp_crypto_op_type_t op_type;
odp_bool_t cipher_range_in_bits;
odp_bool_t auth_range_in_bits;
} crypto_session_t;
typedef struct crypto_op_test_param_t {
crypto_session_t session;
int32_t oop_shift;
crypto_test_reference_t *ref;
odp_packet_data_range_t cipher_range;
odp_packet_data_range_t auth_range;
uint32_t digest_offset;
odp_bool_t adjust_segmentation;
odp_bool_t wrong_digest;
uint32_t first_seg_len;
uint32_t header_len;
uint32_t trailer_len;
} crypto_op_test_param_t;
void test_crypto_op(const crypto_op_test_param_t *param);
int crypto_op(odp_packet_t pkt_in,
odp_packet_t *pkt_out,
odp_bool_t *ok,
const odp_crypto_packet_op_param_t *op_params,
odp_crypto_op_type_t op_type);
#endif
|