CryptoPassphrase  Check-in [882469f9d5]

Overview
Comment:[iOS] Fix using key files
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 882469f9d53d9bf62beb31a6b808f557ee799b16ae793515d25b1ceccc23648f
User & Date: js on 2022-06-18 13:15:39
Other Links: manifest | tags
Context
2022-06-18
15:28
[iOS] Fix missing 0 byte after passphrase check-in: b57405c1d0 user: js tags: trunk
13:15
[iOS] Fix using key files check-in: 882469f9d5 user: js tags: trunk
2022-06-15
18:53
[iOS] Clean up Xcode project check-in: 5a2cc30911 user: js tags: trunk
Changes

Modified iOS/ShowDetailsController.swift from [161a2ecc95] to [53bee1dba4].

143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
            guard let documentDirectory = NSSearchPathForDirectoriesInDomains(
                .documentDirectory, .userDomainMask, true).first
            else {
                print("Could not get key files: No documents directory")
                return
            }

            let keyFilePath =
                documentDirectory.ofObject.appending(keyFile.ofObject)
            generator.keyFile = OFMutableData(contentsOfFile: keyFilePath)
        }

        let passphraseText = (passphraseField?.text ?? "") as NSString
        let passphraseLen =
            passphraseText.lengthOfBytes(using: String.Encoding.utf8.rawValue)
        let passphrase = OFSecureData(count: passphraseLen,







|
|







143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
            guard let documentDirectory = NSSearchPathForDirectoriesInDomains(
                .documentDirectory, .userDomainMask, true).first
            else {
                print("Could not get key files: No documents directory")
                return
            }

            let keyFilePath = documentDirectory.ofObject.appendingPathComponent(
                keyFile.ofObject)
            generator.keyFile = OFMutableData(contentsOfFile: keyFilePath)
        }

        let passphraseText = (passphraseField?.text ?? "") as NSString
        let passphraseLen =
            passphraseText.lengthOfBytes(using: String.Encoding.utf8.rawValue)
        let passphrase = OFSecureData(count: passphraseLen,