Skip to content

An Swift implementation of base 58 string encoding and decoding

License

Notifications You must be signed in to change notification settings

TheVanDoom/Base58String

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swift Base58String

Base58String is forked from this original repository by Tyler Cloutier.

This repository reworks some aspects of the implementation and replaces deprecated functionality where possible.

How to Install

Swift Package Manager

Add the following to your Package.swift file in "dependencies".

.package(url: "https://github.com/cloutiertyler/Base58String.git", from: "1.0.0")

Usage

import Foundation
import Base58String

func test() {

    let data = Data([222, 100, 50])
    print("Data: \(Array(data))")

    let encoded = String(base58Encoding: data)
    print("Encoded string: \(encoded)")

    let decoded = Data(base58Decoding: encoded)!
    print("Decoded data: \(Array(decoded))")

}

About

An Swift implementation of base 58 string encoding and decoding

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 96.2%
  • Ruby 3.8%