sc_base64_encode3
Encode a stream to base64
Usage
#include <opensc.h>
int sc_base64_encode(const unsigned char *inbuf, size_t inlen,
unsigned char *outbuf, size_t outlen,
size_t linelength);
Overview
This function encodes the buffer pointed to by inbuf of size inlen as base64, and stores the result in outbuf, which is outlen bytes long. A linefeed (\n) will be inserted every linelength bytes in the output buffer.
You must ensure outbuf has enough space to store the base64-encoded version of inbuf.
Return value
Returns 0 if successful, or a negative value in case of error.
Releases
3 releases since Debian 4.0 (Etch); the text changed 2 times.