Skip to content
forked from leafo/lua-base58

base58 decode and encode for strings in lua

License

Notifications You must be signed in to change notification settings

dmi7ry/lua-base58

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

base58

A Lua module for converting strings to base58. It works by converting your string into an interal big integer representation, then diving out the base58 components.

Example

local base58 = require("base58")
print(base58.encode_base58("Hello world"))
print(base58.decode_base58("TvjnTzXAiTprExJ"))

Install

luarocks install base58

Reference

All functions are available in the base58 module:

local base58 = require("base58")

The following alphabet is included and used by default. It's currently not possible to configure the alphabet without editing the source.

rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz

encode_base58(string)

Encodes the string into base58

decode_base58(string)

Decodes base58 back into original string. If the input passed in contains invalid characters nil and an error message are returned.

Contact

Author: Leaf Corcoran (leafo) (@moonscript)
Email: leafot@gmail.com
Homepage: http://leafo.net
License: MIT

About

base58 decode and encode for strings in lua

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • MoonScript 63.8%
  • Lua 35.7%
  • Makefile 0.5%