LCOV - code coverage report
Current view: top level - src/edhoc - associated_data_encode.c (source / functions) Coverage Total Hit
Test: lcov.info Lines: 100.0 % 4 4
Test Date: 2026-03-12 12:01:18 Functions: 100.0 % 1 1
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: - 0 0

             Branch data     Line data    Source code
       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                 :             : 
      12                 :             : #include <stdint.h>
      13                 :             : #include <string.h>
      14                 :             : 
      15                 :             : #include "edhoc/edhoc_cose.h"
      16                 :             : #include "edhoc/associated_data_encode.h"
      17                 :             : 
      18                 :             : #include "common/oscore_edhoc_error.h"
      19                 :             : #include "common/print_util.h"
      20                 :             : #include "common/byte_array.h"
      21                 :             : 
      22                 :           9 : enum err associated_data_encode(struct byte_array *thX, struct byte_array *out)
      23                 :             : {
      24                 :           9 :         uint8_t context_str[] = { "Encrypt0" };
      25                 :           9 :         struct byte_array context = BYTE_ARRAY_INIT(
      26                 :             :                 context_str, (uint32_t)strlen((char *)context_str));
      27                 :             : 
      28                 :           9 :         return cose_enc_structure_encode(&context, &NULL_ARRAY, thX, out);
      29                 :             : }
        

Generated by: LCOV version 2.0-1