|
CJOSE 0.6.2.3
|
Functions for encoding to and decoding from base64 and base64url. More...
Go to the source code of this file.
Functions | |
| bool | cjose_base64_encode (const uint8_t *input, const size_t inlen, char **output, size_t *outlen, cjose_err *err) |
| bool | cjose_base64url_encode (const uint8_t *input, const size_t inlen, char **output, size_t *outlen, cjose_err *err) |
| bool | cjose_base64_decode (const char *input, const size_t inlen, uint8_t **output, size_t *outlen, cjose_err *err) |
| bool | cjose_base64url_decode (const char *input, const size_t inlen, uint8_t **output, size_t *outlen, cjose_err *err) |
Functions for encoding to and decoding from base64 and base64url.
NOTE: When successful, the output of each function MUST be released by calling free(), even if the output is of 0 length.
| bool cjose_base64_decode | ( | const char * | input, |
| const size_t | inlen, | ||
| uint8_t ** | output, | ||
| size_t * | outlen, | ||
| cjose_err * | err ) |
Decodes the given string from Base64.
NOTE: output is NOT NULL-terminated.
| input | The text string to decode. |
| inlen | The length of input. |
| output | The decoded octet string. |
| outlen | The length of output. |
| err | [out] An optional error object which can be used to get additional information in the event of an error. |
| bool cjose_base64_encode | ( | const uint8_t * | input, |
| const size_t | inlen, | ||
| char ** | output, | ||
| size_t * | outlen, | ||
| cjose_err * | err ) |
Encodes the given octet string to Base64.
| input | The octet string to encode. |
| inlen | The length of input. |
| output | The encoded text string. |
| outlen | The length of output (not including the terminating NULL). |
| err | [out] An optional error object which can be used to get additional information in the event of an error. |
| bool cjose_base64url_decode | ( | const char * | input, |
| const size_t | inlen, | ||
| uint8_t ** | output, | ||
| size_t * | outlen, | ||
| cjose_err * | err ) |
Decodes the given string from URL-Safe Base64.
NOTE: output is NOT NULL-terminated.
| input | The text string to decode. |
| inlen | The length of input. |
| output | The decoded octet string. |
| outlen | The length of output. |
| err | [out] An optional error object which can be used to get additional information in the event of an error. |
| bool cjose_base64url_encode | ( | const uint8_t * | input, |
| const size_t | inlen, | ||
| char ** | output, | ||
| size_t * | outlen, | ||
| cjose_err * | err ) |
Encodes the given octet string to URL-safe Base64.
| input | The octet string to encode. |
| inlen | The length of input. |
| output | The encoded output string. |
| outlen | The length of output (not including the terminating NULL). |
| err | [out] An optional error object which can be used to get additional information in the event of an error. |