X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem.Security.Cryptography%2FCryptoStream.cs;h=28511eec1b188f35b13439e594222453907814e5;hb=61fdcc0f234667d585e8d2dc7cee2d9e954af01b;hp=04b0bc6b7fc39cf4e1e8a7a9a65392df78f94900;hpb=13d1764537ce5bbe5a06bf133fb2db1a4b5d2131;p=mono.git diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs old mode 100755 new mode 100644 index 04b0bc6b7fc..28511eec1b1 --- a/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs +++ b/mcs/class/corlib/System.Security.Cryptography/CryptoStream.cs @@ -6,11 +6,7 @@ // Sebastien Pouliot (sebastien@ximian.com) // // Portions (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com) -// (C) 2004 Novell (http://www.novell.com) -// - -// -// Copyright (C) 2004 Novell, Inc (http://www.novell.com) +// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -32,13 +28,15 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -using System; using System.Globalization; using System.IO; using System.Runtime.InteropServices; namespace System.Security.Cryptography { +#if NET_2_0 + [ComVisible (true)] +#endif public class CryptoStream : Stream { private Stream _stream; private ICryptoTransform _transform; @@ -278,8 +276,6 @@ namespace System.Security.Cryptography { // transform all except the last block (which may be the last block // of the stream and require TransformFinalBlock) int numBlock = ((_partialCount + count) / _transform.InputBlockSize); - if (((_partialCount + count) % _transform.InputBlockSize) == 0) // partial block ? - numBlock--; // no then reduce int multiSize = (numBlock * _transform.InputBlockSize); if (numBlock > 0) { byte[] multiBlocks = new byte [multiSize]; @@ -349,7 +345,11 @@ namespace System.Security.Cryptography { throw new NotSupportedException ("SetLength"); } +#if NET_2_0 + protected override void Dispose (bool disposing) +#else protected virtual void Dispose (bool disposing) +#endif { if (!_disposed) { _disposed = true;