lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r776427 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs
Date Tue, 19 May 2009 19:33:49 GMT
Author: digy
Date: Tue May 19 19:33:48 2009
New Revision: 776427

URL: http://svn.apache.org/viewvc?rev=776427&view=rev
Log:
LUCENENET-175 Add FIPS compliance to lucene.net

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Store/FSDirectory.cs?rev=776427&r1=776426&r2=776427&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs Tue May 19 19:33:48
2009
@@ -89,12 +89,16 @@
 		/// the <code>getDirectory</code> methods that take a
 		/// <code>lockFactory</code> (for example, {@link #GetDirectory(String, LockFactory)}).
 		/// </deprecated>
-		public static readonly System.String LOCK_DIR = SupportClass.AppSettings.Get("Lucene.Net.lockDir",
System.IO.Path.GetTempPath());
+        
+        //Deprecated. As of 2.1, LOCK_DIR is unused because the write.lock is now stored
by default in the index directory. 
+        //If you really want to store locks elsewhere you can create your own SimpleFSLockFactory
(or NativeFSLockFactory, etc.) passing in your preferred lock directory. 
+        //Then, pass this LockFactory instance to one of the getDirectory methods that take
a lockFactory (for example, getDirectory(String, LockFactory)).
+		//public static readonly System.String LOCK_DIR = SupportClass.AppSettings.Get("Lucene.Net.lockDir",
System.IO.Path.GetTempPath());
 		
 		/// <summary>The default class which implements filesystem-based directories. </summary>
 		private static System.Type IMPL;
 		
-		private static System.Security.Cryptography.MD5 DIGESTER;
+        private static System.Security.Cryptography.HashAlgorithm DIGESTER;
 		
 		/// <summary>A buffer optionally used in renameTo method </summary>
 		private byte[] buffer = null;
@@ -888,7 +892,7 @@
 			{
 				try
 				{
-					DIGESTER = System.Security.Cryptography.MD5.Create();
+                    DIGESTER = SupportClass.Cryptography.GetHashAlgorithm();
 				}
 				catch (System.Exception e)
 				{



Mime
View raw message