Use MD5.Create () instead of new MD5CryptoServiceProvider()
authorFrederik Carlier <frederik.carlier@quamotion.mobi>
Wed, 15 Mar 2017 23:26:13 +0000 (00:26 +0100)
committerMarek Safar <marek.safar@gmail.com>
Thu, 16 Mar 2017 08:09:50 +0000 (09:09 +0100)
mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs

index 178bddb250a409f0edf8af0d7181013c8c7d0362..2d87ac21cd5ee404003264eaafd7cc092ea00b59 100644 (file)
@@ -608,7 +608,7 @@ namespace MonoTests.System.Drawing {
                                }                               
                        }
                
-                       hash = new MD5CryptoServiceProvider().ComputeHash (pixels);
+                       hash = MD5.Create ().ComputeHash (pixels);
                        return ByteArrayToString (hash);
                }
                public string RotateIndexedBmp (Bitmap src, RotateFlipType type)
@@ -658,7 +658,7 @@ namespace MonoTests.System.Drawing {
                        if (pixel_data == null)
                                return "--ERROR--";
 
-                       byte[] hash = new MD5CryptoServiceProvider().ComputeHash (pixel_data);
+                       byte[] hash = MD5.Create ().ComputeHash (pixel_data);
                        return ByteArrayToString (hash);
                }