diff options
author | UbitUmarov | 2018-11-18 01:01:39 +0000 |
---|---|---|
committer | UbitUmarov | 2018-11-18 01:01:39 +0000 |
commit | 65310f3e5ed493dc48233f7854e973f6c2c6d5dd (patch) | |
tree | dba32d7367ea8d6f22923d6e1e21cd28e5016c50 /OpenSim/Services/FSAssetService/FSAssetService.cs | |
parent | ohh we have build instructions on git also ;) (diff) | |
download | opensim-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/Services/FSAssetService/FSAssetService.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Services/FSAssetService/FSAssetService.cs b/OpenSim/Services/FSAssetService/FSAssetService.cs index 028dd01..2fb3e6c 100644 --- a/OpenSim/Services/FSAssetService/FSAssetService.cs +++ b/OpenSim/Services/FSAssetService/FSAssetService.cs | |||
@@ -52,7 +52,6 @@ namespace OpenSim.Services.FSAssetService | |||
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | 53 | ||
54 | static System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); | 54 | static System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); |
55 | static SHA256CryptoServiceProvider SHA256 = new SHA256CryptoServiceProvider(); | ||
56 | 55 | ||
57 | static byte[] ToCString(string s) | 56 | static byte[] ToCString(string s) |
58 | { | 57 | { |
@@ -357,7 +356,9 @@ namespace OpenSim.Services.FSAssetService | |||
357 | 356 | ||
358 | string GetSHA256Hash(byte[] data) | 357 | string GetSHA256Hash(byte[] data) |
359 | { | 358 | { |
360 | byte[] hash = SHA256.ComputeHash(data); | 359 | byte[] hash; |
360 | using (SHA256CryptoServiceProvider SHA256 = new SHA256CryptoServiceProvider()) | ||
361 | hash = SHA256.ComputeHash(data); | ||
361 | 362 | ||
362 | return BitConverter.ToString(hash).Replace("-", String.Empty); | 363 | return BitConverter.ToString(hash).Replace("-", String.Empty); |
363 | } | 364 | } |