Просмотр исходного кода

2006-10-04 Sebastien Pouliot <[email protected]>

	* RSAManagedTest.cs: Forgot to update test cases after right padding 
	was added.


svn path=/trunk/mcs/; revision=66221
Sebastien Pouliot 19 лет назад
Родитель
Сommit
502f22dc5b

+ 5 - 0
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/ChangeLog

@@ -1,3 +1,8 @@
+2006-10-04  Sebastien Pouliot  <[email protected]>
+
+	* RSAManagedTest.cs: Forgot to update test cases after right padding 
+	was added.
+
 2006-09-05  Sebastien Pouliot  <[email protected]>
 
 	* RSAManagedTest.cs: Add a test case for #79269 (wrong exception).

+ 2 - 1
mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs

@@ -225,7 +225,8 @@ namespace MonoTests.Mono.Security.Cryptography {
 			byte[] enc = pubkey.EncryptValue (data);
 
 			byte[] dec = rsa.DecryptValue (enc);
-			Assert.AreEqual (BitConverter.ToString (data), BitConverter.ToString (dec), msg);
+			// note: the decrypted value is now right padded with zeros
+			Assert.IsTrue (BitConverter.ToString (dec).EndsWith (BitConverter.ToString (data)), msg);
 		}
 
 		// Validate that we can sign with every keypair and verify the signature