[Mono-list] MemoryStream problem
Sebastien Pouliot
Sebastien Pouliot <spouliot@videotron.ca>
Sun, 23 Feb 2003 18:02:20 -0500
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: spouliot@motus.com
home: spouliot@videotron.ca
----- Original Message -----
From: "Elan Feingold" <efeingold@mn.rr.com>
To: <mono-list@lists.ximian.com>
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 - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>