[Mono-bugs] [Bug 69036][Nor] Changed - An System.ArgumentException appears when execute any assembly that use PasswordDeriveBytes class

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 2 Nov 2004 16:40:29 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sebastien@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=69036

--- shadow/69036	2004-11-02 16:30:53.000000000 -0500
+++ shadow/69036.tmp.29603	2004-11-02 16:40:29.000000000 -0500
@@ -84,6 +84,28 @@
 
 How often does this happen? 
 Every time
 
 Additional Information:
 The class work fine on .Net Framework.
+
+------- Additional Comments From sebastien@ximian.com  2004-11-02 16:40 -------
+Simpler test case:
+
+using System;
+using System.Security.Cryptography;
+
+class Foo
+{
+	public static void Main( string[] args )
+	{
+		byte[] clearbytes = System.Text.Encoding.UTF8.GetBytes ("go mono!!!");
+		PasswordDeriveBytes pdb = new PasswordDeriveBytes ("12345678password",
+			new byte[] {0x47, 0x6F, 0x6E, 0x7A, 0x61, 0x6C, 0x6F, 0x20, 0x53,
+0x6F, 0x73, 0x61} );
+
+		byte[] key = pdb.GetBytes (32);
+		Console.WriteLine ("key\t{0}", BitConverter.ToString (key));
+		byte[] iv = pdb.GetBytes (16);
+		Console.WriteLine ("iv\t{0}", BitConverter.ToString (iv));
+	}
+}