/* * TinyBlocks - tb_base64.h * Library tinyblocks-base64: codifica/decodifica Base64 (categoria "Base64"). * Independente do editor. */ #ifndef TINYBLOCKS_BASE64_H #define TINYBLOCKS_BASE64_H #include TB_API const TinyBlocks_LibraryDescriptor* tb_base64_get_library(void); /* -- API C: buffers alocados com malloc (libere com free) --- */ /* Codifica n bytes em texto Base64 terminado em '\0'. */ TB_API char* tb_base64_encode(const void* data, size_t n); /* Decodifica texto Base64; escreve o tamanho em *out_len (se != NULL). */ TB_API unsigned char* tb_base64_decode(const char* text, size_t* out_len); /* Atalhos para strings (o decode devolve texto terminado em '\0'). */ TB_API char* tb_base64_encode_str(const char* s); TB_API char* tb_base64_decode_str(const char* s, size_t* out_len); TB_API const char* tb_base64_last_error(void); #endif /* TINYBLOCKS_BASE64_H */