get;
}
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
Dispose (false);
}
+#if NET_4_0
+ protected virtual void Dispose (bool disposing)
+ {
+ }
+#else
protected abstract void Dispose (bool disposing);
-
+#endif
public abstract void FromXmlString (string xmlString);
public abstract string ToXmlString (bool includePrivateParameters);
get { return 0; }
}
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
// Author:\r
// Thomas Neidhart (tome@sbox.tugraz.at)\r
//\r
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2005, 2011 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
namespace System.Security.Cryptography {\r
\r
[ComVisible (true)]
+#if NET_4_0
public abstract class DeriveBytes : IDisposable {
- private bool m_disposed;
-
+#else
+ public abstract class DeriveBytes {
+#endif
protected DeriveBytes ()
{
}\r
\r
public abstract void Reset ();
- void IDisposable.Dispose()
+#if NET_4_0
+ private bool m_disposed;
+
+ public void Dispose ()
{
Dispose(true);
}
m_disposed = true;
}
}
+#endif
}\r
}\r
Dispose (true);
}
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
get { return 1; }
}
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
~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);
}
// zeroize temporary password storage
Array.Clear (password, 0, password.Length);
+#if NET_4_0
+ base.Dispose (disposing);
+#endif
}
private void Prepare (string strPassword, byte[] rgbSalt, string strHashName, int iterations)
_pos = 0;
_f = 0;
}
+#if NET_4_0
+ protected override void Dispose (bool disposing)
+ {
+ Array.Clear (_buffer, 0, _buffer.Length);
+ Array.Clear (_salt, 0, _salt.Length);
+ _hmac.Clear ();
+ base.Dispose (disposing);
+ }
+#endif
}
}
{
}
- void System.IDisposable.Dispose ()
+#if NET_4_0
+ public void Dispose ()
+#else
+ void IDisposable.Dispose ()
+#endif
{
_st.Clear ();
}
Dispose (false);
}
#endif
+
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary
Dispose (true);
}
+#if NET_4_0
+ public void Dispose ()
+#else
void IDisposable.Dispose ()
+#endif
{
Dispose (true);
GC.SuppressFinalize (this); // Finalization is now unnecessary