CryptoPassphrase  Diff

Differences From Artifact [2d0d3612cd]:

To Artifact [728614f00a]:


196
197
198
199
200
201
202
203
204
205





206
207
208
209
210
211
212
213
196
197
198
199
200
201
202



203
204
205
206
207

208
209
210
211
212
213
214







-
-
-
+
+
+
+
+
-







		@try {
			[generator derivePassword];
		} @finally {
			of_explicit_memset(passphrase, 0, strlen(passphrase));
			free(passphrase);
		}

		NSMutableString *password = [NSMutableString
		    stringWithUTF8String: (char *)generator.output];
		of_explicit_memset(generator.output, 0,
		NSMutableString *password = [[[NSMutableString alloc]
		    initWithBytes: (char *)generator.output
			   length: generator.length
			 encoding: NSUTF8StringEncoding] autorelease];
		of_explicit_memset(generator.output, 0, generator.length);
		    strlen((char *)generator.output));

		dispatch_sync(dispatch_get_main_queue(), ^ {
			activityController.view.hidden = YES;
			block(password);
		});
	});
}