Update directory structure

This commit is contained in:
Dimitri Lozeve 2020-06-05 15:42:43 +02:00
parent 2c26f4bbcc
commit f8b7a7755c
13 changed files with 74 additions and 7 deletions

13
src/utils.h Normal file
View file

@ -0,0 +1,13 @@
#ifndef UTILS_H
#define UTILS_H
#include <stdlib.h>
unsigned char hex_to_byte(const char c);
size_t hex_to_bytes(unsigned char *out, const char hex[static 1]);
char *bytes_to_base64(char *out, const unsigned char in[static 1], size_t len);
size_t base64_to_bytes(unsigned char *out, const char *in);
double frequency_score(const char *buf, size_t len);
unsigned int hamming(const char *s1, const char *s2);
#endif /* UTILS_H */