# Base64

**Noir.Libraries.Base64**: `NoirLibrary`

A library containing helper methods to serialize strings into Base64 and back.

This code is from <https://gist.github.com/To0fan/ca3ebb9c029bb5df381e4afc4d27b4a6>

***

**Noir.Libraries.Base64.Characters**: `string`

Character table as a string.

Used internally, do not use in your code.

***

```lua
Noir.Libraries.Base64:Encode(data)
```

Encode a string into Base64.

### Parameters

* `data`: string

### Returns

* `string`

***

```lua
Noir.Libraries.Base64:_EncodeInitial(data)
```

Used internally, do not use in your code.

### Parameters

* `data`: string

### Returns

* `string`

***

```lua
Noir.Libraries.Base64:_EncodeFinal(data)
```

Used internally, do not use in your code.

### Parameters

* `data`: string

### Returns

* `string`

***

```lua
Noir.Libraries.Base64:Decode(data)
```

Decode a string from Base64.

### Parameters

* `data`: string

### Returns

* `string`

***

```lua
Noir.Libraries.Base64:_DecodeInitial(str)
```

Used internally, do not use in your code.

### Parameters

* `str`: string

### Returns

* `string`

***

```lua
Noir.Libraries.Base64:_DecodeFinal(str)
```

Used internally, do not use in your code.

### Parameters

* `str`: string

### Returns

* `string`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cuhhub.gitbook.io/noir/api-reference/built-ins/libraries/base64.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
