LCOV - code coverage report
Current view: top level - lib - base64.h (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 0 2 0.0 %
Date: 2023-04-18 16:19:03 Functions: 0 1 0.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <stdbool.h>
       4             : #include <stddef.h>
       5             : 
       6             : unsigned char *base64_encode(const unsigned char *src, size_t len,
       7             :                               size_t *out_len);
       8             : unsigned char *base64_decode(const unsigned char *src, size_t len,
       9             :                              size_t *out_len);
      10             : 
      11             : bool base64_validate(const unsigned char *src, size_t len);
      12             : 
      13           0 : static inline size_t base64_encoded_len(size_t decoded_len)
      14             : {
      15             :     /* This counts the padding bytes (by rounding to the next multiple of 4). */
      16           0 :     return ((4u * decoded_len / 3u) + 3u) & ~3u;
      17             : }

Generated by: LCOV version 1.15-2-gb9d6727