PasswordFlags
public struct PasswordFlags : OptionSet
Options for generating password
-
Declaration
Swift
public let rawValue: Int
-
Seed file path for hash based random generator
SHA1 hash of given file is used as a (not so) random generator
Declaration
Swift
public var hashSeedPath: String?
-
Characters to remove in passwords
Declaration
Swift
public var removingCharacters: String?
-
Declaration
Swift
public init(rawValue: Int)
-
Contains digits
Declaration
Swift
static let digits: PasswordFlags
-
Contains no digits
Declaration
Swift
static let noDigits: PasswordFlags
-
Contains uppercase
Declaration
Swift
static let uppercase: PasswordFlags
-
Contains no uppercase
Declaration
Swift
static let noUppercase: PasswordFlags
-
Contains no ambiguous characters
Declaration
Swift
static let noAmbiguous: PasswordFlags
-
Contains symbols
Declaration
Swift
static let symbols: PasswordFlags
-
Contains no vowels to avoid words
Declaration
Swift
static let noVowels: PasswordFlags
-
Generates completely random passwords
Declaration
Swift
static let secure: PasswordFlags
-
File hash as random generator
hashSeedPath
needs to be set to use this option. Alternatively,hash(_:)
method can also be used.Declaration
Swift
static let hash: PasswordFlags
-
Characters to remove in passwords
removingCharacters
needs to be set to use this option. Alternatively,remove(_:)
method can also be used.Declaration
Swift
static let remove: PasswordFlags
-
File hash as random generator
Declaration
Swift
static func hash(_ seedPath: String) -> PasswordFlags
Parameters
seedPath
Seed file path for hash based random generator
Return Value
hash
option for password -
Characters to remove in passwords
Declaration
Swift
static func remove(_ chars: String) -> PasswordFlags
Parameters
chars
String containing characters to remove
Return Value
remove
option for password -
Default options for password
Declaration
Swift
static let `default`: PasswordFlags