public classes and others

This commit is contained in:
Cocody 2017-07-25 17:08:30 +08:00
parent e195bf264d
commit fe5dac779c
3 changed files with 5 additions and 5 deletions

View File

@ -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)")

View File

@ -9,7 +9,7 @@
import Foundation
import CryptoSwift
extension UInt8 {
public extension UInt8 {
func ck_bits() -> [String] {
let totalBitsCount = MemoryLayout<UInt8>.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 {

View File

@ -8,7 +8,7 @@
import Foundation
extension String
public extension String
{
func ck_mnemonicData() -> Data {
let length = characters.count