BrainKey
public struct BrainKey : Equatable
Undocumented
-
Undocumented
Declaration
Swift
public let words: [String]
-
Undocumented
Declaration
Swift
public init(words: [String])
-
Generates random
BrainKey
using default seed dictionary of words.Declaration
Swift
public static func generate(count: Int = DCore.Constant.brainKeyWordCount) -> BrainKey
Parameters
count
Number of words to put into generated
BrainKey
.Return Value
BrainKey
consisting of random words. -
Generates random
BrainKey
from provided dictionary of words.Declaration
Swift
public static func generate( usingSeedDictionary seedDictionary: [String], count: Int = DCore.Constant.brainKeyWordCount) -> BrainKey
Parameters
seedDictionary
Dictionary of words to use to generate brain key.
count
Number of words to put into generated
BrainKey
.Return Value
BrainKey
consisting of random words.
-
Undocumented
Declaration
Swift
public func asECKeyPair() throws -> ECKeyPair
-
Converts
BrainKey
toECKeyPair
Declaration
Swift
public func asECKeyPair(normalized: Bool = true, sequence: Int = 0) throws -> ECKeyPair
Parameters
normalized
Normalized brain key will be uppercased prior to generating key pair.
sequence
Sequence number to be used to generate the key pair.
Return Value