size_tjose_b64_dec(constjson_t*i,void*o,size_tol)
Decodes a URL-safe Base64 JSON string to a buffer. If o is NULL, the number of output bytes necessary is
returned.
This function will never write more than ol bytes. If the output buffer is too small, an error will
occur.
Parameters:i The input URL-safe Base64 JSON string.
o The output buffer (may be NULL).
ol The size of the output buffer.
Returns:
The number of bytes that were (or would be) written. If an error occurs, SIZE_MAX is returned.
jose_io_t*jose_b64_dec_io(jose_io_t*next)
Creates a new IO object which performs URL-safe Base64 decoding. All data written to the returned IO
object will be decoded before passing it on to the next IO object in the chain.
Parameters:next The next IO object in the chain.
Returns:
The new IO object or NULL on error.
size_tjose_b64_dec_buf(constvoid*i,size_til,void*o,size_tol)
Decodes a URL-safe Base64 buffer to an output buffer. If o is NULL, the number of output bytes necessary
is returned.
This function will never write more than ol bytes. If the output buffer is too small, an error will
occur.
Parameters:i The input URL-safe Base64 buffer.
il The size of the data in the input buffer.
o The output buffer.
ol The size of the output buffer.
Returns:
The number of bytes that were (or would be) written. If an error occurs, SIZE_MAX is returned.
json_t*jose_b64_dec_load(constjson_t*i)
Decodes a JSON string from a URL-safe Base64 JSON string.
Parameters:i The input URL-safe Base64 JSON string containing JSON data.
Returns:
The output JSON data.
json_t*jose_b64_enc(constvoid*i,size_til)
Encodes data to a URL-safe Base64 JSON string.
Parameters:i The input buffer.
il The size of the data in the input buffer.
Returns:
The decoded JSON data. If an error occurs, NULL is returned.
jose_io_t*jose_b64_enc_io(jose_io_t*next)
Creates a new IO object which performs URL-safe Base64 encoding. All data written to the returned IO
object will be encoded before passing it on to the next IO object in the chain.
Parameters:next The next IO object in the chain.
Returns:
The new IO object or NULL on error.
size_tjose_b64_enc_buf(constvoid*i,size_til,void*o,size_tol)
Encodes data to a URL-safe Base64 buffer. If o is NULL, the number of output bytes necessary is returned.
This function will never write more than ol bytes. If the output buffer is too small, an error will
occur.
Parameters:i The input buffer.
il The size of the data in the input buffer.
o The output URL-safe Base64 buffer.
ol The size of the output buffer.
Returns:
The number of bytes that were (or would be) written. If an error occurs, SIZE_MAX is returned.
json_t*jose_b64_enc_dump(constjson_t*i)
Encodes the input JSON as a URL-safe Base64 JSON string.
Parameters:i The input JSON data.
Returns:
The output URL-safe Base64 JSON string.