aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLXAssetData.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-11-18 01:01:39 +0000
committerUbitUmarov2018-11-18 01:01:39 +0000
commit65310f3e5ed493dc48233f7854e973f6c2c6d5dd (patch)
treedba32d7367ea8d6f22923d6e1e21cd28e5016c50 /OpenSim/Data/MySQL/MySQLXAssetData.cs
parentohh we have build instructions on git also ;) (diff)
downloadopensim-SC-65310f3e5ed493dc48233f7854e973f6c2c6d5dd.zip
opensim-SC-65310f3e5ed493dc48233f7854e973f6c2c6d5dd.tar.gz
opensim-SC-65310f3e5ed493dc48233f7854e973f6c2c6d5dd.tar.bz2
opensim-SC-65310f3e5ed493dc48233f7854e973f6c2c6d5dd.tar.xz
don't share SHA256CryptoServiceProvider (can be improved)
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLXAssetData.cs9
1 files changed, 3 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLXAssetData.cs b/OpenSim/Data/MySQL/MySQLXAssetData.cs
index 9f9c9cf..5c92be9 100644
--- a/OpenSim/Data/MySQL/MySQLXAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLXAssetData.cs
@@ -58,11 +58,6 @@ namespace OpenSim.Data.MySQL
58 private bool m_enableCompression = false; 58 private bool m_enableCompression = false;
59 private string m_connectionString; 59 private string m_connectionString;
60 60
61 /// <summary>
62 /// We can reuse this for all hashing since all methods are single-threaded through m_dbBLock
63 /// </summary>
64 private HashAlgorithm hasher = new SHA256CryptoServiceProvider();
65
66 #region IPlugin Members 61 #region IPlugin Members
67 62
68 public string Version { get { return "1.0.0.0"; } } 63 public string Version { get { return "1.0.0.0"; } }
@@ -250,7 +245,9 @@ namespace OpenSim.Data.MySQL
250 } 245 }
251 } 246 }
252 247
253 byte[] hash = hasher.ComputeHash(asset.Data); 248 byte[] hash;
249 using (HashAlgorithm hasher = new SHA256CryptoServiceProvider())
250 hash = hasher.ComputeHash(asset.Data);
254 251
255// m_log.DebugFormat( 252// m_log.DebugFormat(
256// "[XASSET DB]: Compressed data size for {0} {1}, hash {2} is {3}", 253// "[XASSET DB]: Compressed data size for {0} {1}, hash {2} is {3}",