CryptoPassphrase  Diff

Differences From Artifact [53bee1dba4]:

To Artifact [cfd55e8cf6]:


149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

            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,
                                      allowsSwappableMemory: false)
        memcpy(passphrase.mutableItems, passphraseText.utf8String!,
               passphraseLen)
        generator.passphrase = passphrase

        let mainStoryboard = UIStoryboard(name: "Main", bundle: nil)







|
|







149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

            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) + 1
        let passphrase = OFSecureData(count: passphraseLen,
                                      allowsSwappableMemory: false)
        memcpy(passphrase.mutableItems, passphraseText.utf8String!,
               passphraseLen)
        generator.passphrase = passphrase

        let mainStoryboard = UIStoryboard(name: "Main", bundle: nil)