libcontrac
A library for contact tracing
Macros | Functions
utils.h File Reference

Static utility functions. More...

#include <time.h>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX(a, b)
 
#define MIN(a, b)
 

Functions

size_t base64_encode_size (size_t binary_input)
 
size_t base64_decode_size (size_t base64_input)
 
void base64_encode_binary_to_base64 (unsigned char const *input, size_t input_size, unsigned char *output, size_t *output_size)
 
void base64_decode_base64_to_binary (unsigned char const *input, size_t input_size, unsigned char *output, size_t *output_size)
 
uint32_t epoch_to_day_number (time_t epoch)
 
uint8_t epoch_to_time_interval_number (time_t epoch)
 

Detailed Description

Static utility functions.

Author
David Llewellyn-Jones david.nosp@m.@fly.nosp@m.pig.c.nosp@m.o.uk
Version
0.01

LICENSE

Copyright David Llewellyn-Jones, 2020 Released under the GPLv2.

DESCRIPTION

Provides various static utitlity functions. In particular:

base64 encoding and decoding functionality. Time conversion: from epoch to day numbers and time interval numbers.