https://bugzilla.novell.com/show_bug.cgi?id=670439
https://bugzilla.novell.com/show_bug.cgi?id=670439#c0 Summary: NSData's file encryption corrupts data in Monotouch 3.2.4 Classification: Mono Product: MonoTouch Version: unspecified Platform: Other OS/Version: Mac OS X 10.6 Status: NEW Severity: Major Priority: P5 - None Component: Runtime AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Development Blocker: --- I'm trying to encrypt a file on the fly using the following code: NSError oError = null; using ( FileStream oStream = File.Open ( sSourcePathAndFile, FileMode.Open ) ) { NSData oData = NSData.FromStream ( oStream ); // Save and encrypt. oData.Save ( sDestPathAndFile, NSDataWritingOptions.FileProtectionAlways, out oError ); } There is no error but all the saved files have approximately doubled in size and are corrupt. Even if I set the writing options "FileProtectionNone", which should not change the file at all, I get the same results. If NSData.FromFile() is used, encrpytion works as expected. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
