W3cubDocs

/Hammerspoon

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

decode
Signature hs.base64.decode(str) -> val
Type Function
Description

Decodes a given base64 string

Parameters
  • str - A base64 encoded string
Returns
  • A string containing the decoded data
Source extensions/base64/base64.lua line 40
encode
Signature hs.base64.encode(val[,width]) -> str
Type Function
Description

Encodes 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
Source extensions/base64/base64.lua line 14

© 2014–2017 Hammerspoon contributors
Licensed under the MIT License.
https://www.hammerspoon.org/docs/hs.base64.html