#hs.base64

Base64 encoding and decoding

Portions sourced from (https://gist.github.com/shpakovski/1902994).


#API Overview

Functions - API calls offered directly by the extension


#API Documentation

#Functions

Signaturehs.base64.decode(str) -> val
TypeFunction
DescriptionDecodes a given base64 string
Parameters
  • str - A base64 encoded string
Returns
  • A string containing the decoded data
NotesNone
ExamplesNone
Sourceextensions/base64/base64.lua line 40

Signaturehs.base64.encode(val[,width]) -> str
TypeFunction
DescriptionEncodes a given string to base64
Parameters
  • val - A string to encode as base64
  • width - Optional line width to split the string into (usually 64 or 76)
Returns
  • A string containing the base64 representation of the input string
NotesNone
ExamplesNone
Sourceextensions/base64/base64.lua line 14