Michele Albano 5fd724fceb
C client generator improvements to support petstore. Solves #5836 (#5837)
* C client generator improvement to support:
openapi-generator/modules/openapi-generator/src/test/resources/3_0/petstore.yaml

* Improvements to the C client generator:
- moved base64* from apiClient.c to binary.h/binary.c
- changed CR/LF to LF in binary.h/binary.c

* C client generator: better support for base64encode / base64decode
2020-04-07 11:40:57 +08:00

19 lines
409 B
C

#ifndef INCLUDE_BINARY_H
#define INCLUDE_BINARY_H
#include <stdint.h>
typedef struct binary_t
{
uint8_t* data;
unsigned int len;
} binary_t;
binary_t* instantiate_binary_t(char* data, int len);
char *base64encode(const void *b64_encode_this, int encode_this_many_bytes);
char *base64decode(const void *b64_decode_this, int decode_this_many_bytes, int *decoded_bytes);
#endif // INCLUDE_BINARY_H