---
name: "jose_b64"
section: "3"
platform: "linux"
package: "jose"
version: "15-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/jose_b64"
---

# jose\_b64(3)

URL-safe Base64 Encoding & Decoding.

## NAME

jose\_b64 - URL-safe Base64 Encoding & Decoding.

## SYNOPSIS

### Functions

size\_t **jose\_b64\_dec** (const json\_t \*i, void \*o, size\_t ol)\
 Decodes a URL-safe Base64 JSON string to a buffer.  **jose\_io\_t** \* **jose\_b64\_dec\_io** (**jose\_io\_t** \*next)\
 Creates a new IO object which performs URL-safe Base64 decoding.  size\_t **jose\_b64\_dec\_buf** (const void \*i, size\_t il, void \*o, size\_t ol)\
 Decodes a URL-safe Base64 buffer to an output buffer.  json\_t \* **jose\_b64\_dec\_load** (const json\_t \*i)\
 Decodes a JSON string from a URL-safe Base64 JSON string.  json\_t \* **jose\_b64\_enc** (const void \*i, size\_t il)\
 Encodes data to a URL-safe Base64 JSON string.  **jose\_io\_t** \* **jose\_b64\_enc\_io** (**jose\_io\_t** \*next)\
 Creates a new IO object which performs URL-safe Base64 encoding.  size\_t **jose\_b64\_enc\_buf** (const void \*i, size\_t il, void \*o, size\_t ol)\
 Encodes data to a URL-safe Base64 buffer.  json\_t \* **jose\_b64\_enc\_dump** (const json\_t \*i)\
 Encodes the input JSON as a URL-safe Base64 JSON string.

## Detailed Description

URL-safe Base64 Encoding & Decoding.

## Function Documentation

### size\_t jose\_b64\_dec (const json\_t \* i, void \* o, size\_t ol)

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\_t jose\_b64\_dec\_buf (const void \* i, size\_t il, void \* o, size\_t ol)

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 (const json\_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 (const void \* i, size\_t il)

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\_t jose\_b64\_enc\_buf (const void \* i, size\_t il, void \* o, size\_t ol)

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 (const json\_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.

## Author

Generated automatically by Doxygen for José from the source code.
