intégration des logiciels tier comme NanoMQ ainsi que les fichiers json de score

This commit is contained in:
2024-11-18 22:44:28 +01:00
parent 8f2ed89e05
commit a04c4c1f59
138 changed files with 27816 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#ifndef BASE64_H
#define BASE64_H
#include "nng/nng.h"
#define BASE64_ENCODE_OUT_SIZE(s) ((unsigned int)((((s) + 2) / 3) * 4 + 1))
#define BASE64_DECODE_OUT_SIZE(s) ((unsigned int)(((s) / 4) * 3))
/*
* out is null-terminated encode string.
* return values is out length, exclusive terminating `\0'
*/
NNG_DECL unsigned int
base64_encode(const unsigned char *in, unsigned int inlen, char *out);
/*
* return values is out length
*/
NNG_DECL unsigned int
base64_decode(const char *in, unsigned int inlen, unsigned char *out);
#endif /* BASE64_H */