Convert to Swift 4
- Will fix all warnings next.
This commit is contained in:
parent
7640d55317
commit
774f05eae0
17 changed files with 77 additions and 49 deletions
|
|
@ -111,7 +111,7 @@ public class Utils {
|
|||
} else if !NSCharacterSet.letters.contains(element) {
|
||||
charColor = Globals.blue
|
||||
}
|
||||
attributedPassword.addAttribute(NSForegroundColorAttributeName, value: charColor, range: NSRange(location: index, length: 1))
|
||||
attributedPassword.addAttribute(NSAttributedStringKey.foregroundColor, value: charColor, range: NSRange(location: index, length: 1))
|
||||
}
|
||||
return attributedPassword
|
||||
}
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ public class PasswordStore {
|
|||
let privateMOC = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType)
|
||||
privateMOC.parent = context
|
||||
privateMOC.perform {
|
||||
passwordEntity.image = NSData(data: image)
|
||||
passwordEntity.image = NSData(data: image) as Data
|
||||
do {
|
||||
try privateMOC.save()
|
||||
self.context.performAndWait {
|
||||
|
|
@ -843,7 +843,7 @@ public class PasswordStore {
|
|||
throw AppError.PGPPublicKeyNotExistError
|
||||
}
|
||||
let plainData = password.getPlainData()
|
||||
let encryptedData = try pgp.encryptData(plainData, using: publicKey, armored: SharedDefaults[.encryptInArmored])
|
||||
let encryptedData = try pgp.encryptData(plainData, using: Array(publicKey), armored: SharedDefaults[.encryptInArmored])
|
||||
return encryptedData
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue