Coverage Report

Created: 2025-06-13 06:57

/src/openssl/include/internal/to_hex.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Copyright 2024 The OpenSSL Project Authors. All Rights Reserved.
3
 *
4
 * Licensed under the Apache License 2.0 (the "License").  You may not use
5
 * this file except in compliance with the License.  You can obtain a copy
6
 * in the file LICENSE in the source distribution or at
7
 * https://www.openssl.org/source/license.html
8
 */
9
10
#ifndef OSSL_INTERNAL_TO_HEX_H
11
# define OSSL_INTERNAL_TO_HEX_H
12
# pragma once
13
14
static ossl_inline size_t to_hex(char *buf, uint8_t n, const char hexdig[17])
15
1.13M
{
16
1.13M
    *buf++ = hexdig[(n >> 4) & 0xf];
17
1.13M
    *buf = hexdig[n & 0xf];
18
1.13M
    return 2;
19
1.13M
}
Unexecuted instantiation: ssl_lib.c:to_hex
o_str.c:to_hex
Line
Count
Source
15
1.13M
{
16
1.13M
    *buf++ = hexdig[(n >> 4) & 0xf];
17
1.13M
    *buf = hexdig[n & 0xf];
18
1.13M
    return 2;
19
1.13M
}
20
21
static ossl_inline size_t ossl_to_lowerhex(char *buf, uint8_t n)
22
0
{
23
0
    static const char hexdig[] = "0123456789abcdef";
24
25
0
    return to_hex(buf, n, hexdig);
26
0
}
Unexecuted instantiation: ssl_lib.c:ossl_to_lowerhex
Unexecuted instantiation: o_str.c:ossl_to_lowerhex
27
#endif