Server IP : 23.254.227.96 / Your IP : 216.73.216.46 Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64 User : viralblo ( 1001) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/include/rpm/ |
Upload File : |
/* base64 encoder/decoder based on public domain implementation * by Chris Venter */ /** \ingroup rpmio * \file rpmio/rpmbase64.h * * Base64 encoding and decoding API */ #include <sys/types.h> #ifdef __cplusplus extern "C" { #endif /* returns malloced base64 encoded string * lines are split with \n 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 */ char *rpmBase64Encode(const void *data, size_t len, int linelen); /* 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 */ int rpmBase64Decode(const char *in, void **out, size_t *outlen); /* counts CRC24 and base64 encodes it in a malloced string * returns NULL on failures */ char *rpmBase64CRC(const unsigned char *data, size_t len); #ifdef __cplusplus } #endif