Add logic for more customizable password generator

This commit is contained in:
Danny Moesch 2020-02-28 19:04:53 +01:00 committed by Mingshen Sun
parent 49a371d495
commit ff014a5699
10 changed files with 352 additions and 131 deletions

View file

@ -20,7 +20,7 @@ public enum GitAuthenticationMethod: String, DefaultsSerializable {
}
extension SearchBarScope: DefaultsSerializable {}
extension PasswordGeneratorFlavor: DefaultsSerializable {}
extension PasswordGenerator: DefaultsSerializable {}
public extension DefaultsKeys {
var pgpKeySource: DefaultsKey<KeySource?> { .init("pgpKeySource") }
@ -53,7 +53,7 @@ public extension DefaultsKeys {
var isShowFolderOn: DefaultsKey<Bool> { .init("isShowFolderOn", defaultValue: true) }
var isHidePasswordImagesOn: DefaultsKey<Bool> { .init("isHidePasswordImagesOn", defaultValue: false) }
var searchDefault: DefaultsKey<SearchBarScope?> { .init("searchDefault", defaultValue: .all) }
var passwordGeneratorFlavor: DefaultsKey<PasswordGeneratorFlavor> { .init("passwordGeneratorFlavor", defaultValue: .apple) }
var passwordGenerator: DefaultsKey<PasswordGenerator> { .init("passwordGenerator", defaultValue: PasswordGenerator()) }
var encryptInArmored: DefaultsKey<Bool> { .init("encryptInArmored", defaultValue: false) }
}