1 /* 2 Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT 3 file at the top-level directory of this distribution. 4 5 Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 6 http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 7 <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 8 option. This file may not be copied, modified, or distributed 9 except according to those terms. 10 */ 11 #ifndef A_3AE_ENCODE_H 12 #define A_3AE_ENCODE_H 13 14 #include <stdint.h> 15 16 #include "common/oscore_edhoc_error.h" 17 18 /** 19 * @brief Ecodes associated data for message 3. (COSE "Encrypt0") data 20 * structure is used 21 * @param th can be th2 or th3 22 * @param th_len the length of th 23 * @param out pointer to hold the encoded data 24 * @param out_len length of the encoded data 25 */ 26 enum err associated_data_encode(uint8_t *th, const uint32_t th_len, 27 uint8_t *out, uint32_t *out_len); 28 29 #endif 30