rpm 4.19.92
The RPM Package Manager
|
#include <sys/types.h>
Go to the source code of this file.
Functions | |
char * | rpmBase64Encode (const void *data, size_t len, int linelen) |
int | rpmBase64Decode (const char *in, void **out, size_t *outlen) |
char * | rpmBase64CRC (const unsigned char *data, size_t len) |
Base64 encoding and decoding API
char * rpmBase64CRC | ( | const unsigned char * | data, |
size_t | len | ||
) |
counts CRC24 and base64 encodes it in a malloced string returns NULL on failures
int rpmBase64Decode | ( | const char * | in, |
void ** | out, | ||
size_t * | outlen | ||
) |
decodes from zero terminated base64 encoded string to a newly malloced buffer ignores whitespace characters in the input string return values: 0 - OK 1 - input is NULL 2 - invalid length 3 - invalid characters on input 4 - malloc failed
char * rpmBase64Encode | ( | const void * | data, |
size_t | len, | ||
int | linelen | ||
) |
returns malloced base64 encoded string lines are split with
characters to be nearest lower multiple of linelen if linelen/4 == 0 lines are not split if linelen < 0 default line length (64) is used the returned string is empty when len == 0 returns NULL on failures