Abandonment of the project
This commit is contained in:
27
base64.h
Normal file
27
base64.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef __BASE64_H
|
||||
#define __BASE64_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* Public API
|
||||
*/
|
||||
// Encode data as URL-safe Base64.
|
||||
// Parameters:
|
||||
// - data - data to encode
|
||||
// - size - size of data to encode
|
||||
// Returns:
|
||||
// - pointer to resulting \0-terminated string (you must free() it)
|
||||
// - NULL on out-of-memory
|
||||
char *base64_encode(const void *data, uint32_t size);
|
||||
|
||||
// Decode data from URL-safe Base64.
|
||||
// Parameters:
|
||||
// - data - data to decode (must have \0)
|
||||
// - out_size - size of decoded data
|
||||
// Returns:
|
||||
// - pointer to decoded data (you must free() it)
|
||||
// - NULL on out-of-memory
|
||||
void *base64_decode(const char *data, uint32_t *out_size);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user