https://bugzilla.novell.com/show_bug.cgi?id=644648
https://bugzilla.novell.com/show_bug.cgi?id=644648#c0 Summary: CryptoStream does not call FlushFinalBlock when in CryptoStreamMode.Read Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: All OS/Version: Linux Status: NEW Severity: Normal Priority: P5 - None Component: System.Security AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 ( .NET CLR 3.5.30729; .NET4.0E) CryptoStream does not seem to call FlushFinalBlock when CryptoStreamMode.Read. This is incompatible with the implementation in .NET. Reproducible: Always Steps to Reproduce: Here is a small test to repro: [Test] public void CryptoStreamShouldCallFlushFinalBlockOnDispose() { using (SHA1 sha1 = SHA1.Create()) { using (MemoryStream mem = new MemoryStream(new byte[] { 1, 2, 3 }, false)) using (CryptoStream cs = new CryptoStream(mem, sha1, CryptoStreamMode.Read)) { } // this throws on mono but not on windows. Console.WriteLine("hash = {0}", sha1.Hash[0]); } } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
