Hi Elan, It may (or may not) be a MemoryStream issue. The current CryptoStream implementation is very rudimentary - it was able to run some samples from MS but it's still far from complete. It's also one of the few crypto class that still doesn't have any unit tests.
If your code works with MS CLR then please fill a bug in bugzilla. I'll look into it ASAP (i.e. most probablty this week ;-). Sebastien Pouliot Security Architect, Motus Technologies, http://www.motus.com/ work: [EMAIL PROTECTED] home: [EMAIL PROTECTED] ----- Original Message ----- From: "Elan Feingold" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 23, 2003 4:19 PM Subject: [Mono-list] MemoryStream problem > I have the following code: > > MemoryStream mem = new MemoryStream(); > CryptoStream crypto = new CryptoStream (mem, encrypt, > CryptoStreamMode.Write); > crypto.Write (plain, offset, length); > crypto.FlushFinalBlock(); > > byte[] retVal = mem.ToArray(); > > The code for MemoryStream.ToArray() starts with: > > public virtual byte[] ToArray() { > byte[] outBuffer = new byte[capacity]; > > What's happening is that outBuffer is coming back null! I'm only > requesting 3864 bytes, so I find that extremely odd. > > Any advice? > > Thanks, > > -elan > > _______________________________________________ > Mono-list maillist - [EMAIL PROTECTED] > http://lists.ximian.com/mailman/listinfo/mono-list > _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
