Next: binhex, Previous: qp, Up: Basic Functions [Contents][Index]

### 4.7 base64

Base64 is an encoding that encodes three bytes into four characters, thereby increasing the size by about 33%. The alphabet used for encoding is very resistant to mangling during transit.

The following functions are defined by this library:

`base64-encode-region`

  base64 encode the selected region. Return the length of the encoded text. Optional third argument no-line-break means do not break long lines into shorter lines.

`base64-encode-string`

  base64 encode a string and return the result.

`base64-decode-region`

  base64 decode the selected region. Return the length of the decoded text. If the region can’t be decoded, return `nil` and don’t modify the buffer.

`base64-decode-string`

  base64 decode a string and return the result. If the string can’t be decoded, `nil` is returned.