[corlib] Parse datetime string using culture calendar. Fixes #18052
[mono.git] / mcs / class / corlib / System.Security.Cryptography / PasswordDeriveBytes.cs
index 66d18aeb0ec35bfeb16d3602f41c275f41e97b74..80a1dbeead1776cffba2738d31df3710c0aee4b1 100644 (file)
@@ -110,26 +110,22 @@ public class PasswordDeriveBytes : DeriveBytes {
                }
        }
 
-       ~PasswordDeriveBytes () 
-       {
 #if NET_4_0
-               Dispose (false);
-       }
-
        protected override void Dispose (bool disposing)
        {
-#endif
                // zeroize buffer
                if (initial != null) {
                        Array.Clear (initial, 0, initial.Length);
                        initial = null;
                }
                // zeroize temporary password storage
-               Array.Clear (password, 0, password.Length);
-#if NET_4_0
+               if (password != null) {
+                       Array.Clear (password, 0, password.Length);
+                       password = null;
+               }
                base.Dispose (disposing);
-#endif
        }
+#endif
 
        private void Prepare (string strPassword, byte[] rgbSalt, string strHashName, int iterations) 
        {