Merge pull request #1 from keefertaylor/master Add CocoaPod support to Base58String
Merge pull request #1 from keefertaylor/master
Add CocoaPod support to Base58String
Base58String is based off of go-base58 string, available here.
This library provides an idiomatic Swift version of the go library.
Add the following to your Package.swift file in “dependencies”.
.package(url: "https://github.com/cloutiertyler/Base58String.git", from: "0.1.0")
Add the following to your Podfile:
pod 'Base58String', :git => 'https://github.com/keefertaylor/Base58String.git'
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))") }
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Swift Base58String
Base58String is based off of go-base58 string, available here.
This library provides an idiomatic Swift version of the go library.
How to Install
Swift Package Manager
Add the following to your Package.swift file in “dependencies”.
CocoaPods
Add the following to your Podfile:
Usage