From fe5dac779c2304db4b43427ae28d5d4a102009a2 Mon Sep 17 00:00:00 2001 From: Cocody Date: Tue, 25 Jul 2017 17:08:30 +0800 Subject: [PATCH] public classes and others --- CKMnemonic/CKMnemonic/CKMnemonic/CKMnemonic.swift | 4 ++-- CKMnemonic/CKMnemonic/CKMnemonic/Data+CKBitArray.swift | 4 ++-- CKMnemonic/CKMnemonic/CKMnemonic/String+MnemonicData.swift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CKMnemonic/CKMnemonic/CKMnemonic/CKMnemonic.swift b/CKMnemonic/CKMnemonic/CKMnemonic/CKMnemonic.swift index 93a6c44..4d14b8d 100644 --- a/CKMnemonic/CKMnemonic/CKMnemonic/CKMnemonic.swift +++ b/CKMnemonic/CKMnemonic/CKMnemonic/CKMnemonic.swift @@ -10,7 +10,7 @@ import UIKit import CryptoSwift import Security -enum CKMnemonicLanguageType { +public enum CKMnemonicLanguageType { case english func words() -> [String] { @@ -28,7 +28,7 @@ enum CKMnemonicError: Error case unableToCreateSeedData } -class CKMnemonic: NSObject { +public class CKMnemonic: NSObject { static func mnemonicString(from hexString: String, language: CKMnemonicLanguageType) throws -> String { let seedData = hexString.ck_mnemonicData() print("\(hexString.characters.count)\t\(seedData.count)") diff --git a/CKMnemonic/CKMnemonic/CKMnemonic/Data+CKBitArray.swift b/CKMnemonic/CKMnemonic/CKMnemonic/Data+CKBitArray.swift index 5fddcba..95d7efa 100644 --- a/CKMnemonic/CKMnemonic/CKMnemonic/Data+CKBitArray.swift +++ b/CKMnemonic/CKMnemonic/CKMnemonic/Data+CKBitArray.swift @@ -9,7 +9,7 @@ import Foundation import CryptoSwift -extension UInt8 { +public extension UInt8 { func ck_bits() -> [String] { let totalBitsCount = MemoryLayout.size * 8 @@ -27,7 +27,7 @@ extension UInt8 { } } -extension Data { +public extension Data { func ck_toBitArray() -> [String] { var toReturn = [String]() for num: UInt8 in bytes { diff --git a/CKMnemonic/CKMnemonic/CKMnemonic/String+MnemonicData.swift b/CKMnemonic/CKMnemonic/CKMnemonic/String+MnemonicData.swift index 40f0670..ed43469 100644 --- a/CKMnemonic/CKMnemonic/CKMnemonic/String+MnemonicData.swift +++ b/CKMnemonic/CKMnemonic/CKMnemonic/String+MnemonicData.swift @@ -8,7 +8,7 @@ import Foundation -extension String +public extension String { func ck_mnemonicData() -> Data { let length = characters.count