diff options
author | Tom | 2011-01-26 12:40:33 -0800 |
---|---|---|
committer | Tom | 2011-01-26 12:40:33 -0800 |
commit | 4d3696d6581e61581915614b150909ff797a4956 (patch) | |
tree | 12465447ab18dcc9e9d44e7d4ad1b2a192735400 /OpenSim/Region | |
parent | Reproduce a corner case behavior for llListReplaceList (diff) | |
download | opensim-SC_OLD-4d3696d6581e61581915614b150909ff797a4956.zip opensim-SC_OLD-4d3696d6581e61581915614b150909ff797a4956.tar.gz opensim-SC_OLD-4d3696d6581e61581915614b150909ff797a4956.tar.bz2 opensim-SC_OLD-4d3696d6581e61581915614b150909ff797a4956.tar.xz |
Make llSHA1Hash SL compatible when using characters like the euro symbol (€)
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index dffc0bd..1ccf76e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -32,6 +32,7 @@ using System.Diagnostics; //for [DebuggerNonUserCode] | |||
32 | using System.Runtime.Remoting.Lifetime; | 32 | using System.Runtime.Remoting.Lifetime; |
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using System.Security.Cryptography; | ||
35 | using System.Text.RegularExpressions; | 36 | using System.Text.RegularExpressions; |
36 | using Nini.Config; | 37 | using Nini.Config; |
37 | using log4net; | 38 | using log4net; |
@@ -6944,7 +6945,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6944 | public LSL_String llSHA1String(string src) | 6945 | public LSL_String llSHA1String(string src) |
6945 | { | 6946 | { |
6946 | m_host.AddScriptLPS(1); | 6947 | m_host.AddScriptLPS(1); |
6947 | return Util.SHA1Hash(src).ToLower(); | 6948 | SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider(); |
6949 | return BitConverter.ToString(SHA1.ComputeHash(Encoding.UTF8.GetBytes(src))).Replace("-", String.Empty).ToLower(); | ||
6948 | } | 6950 | } |
6949 | 6951 | ||
6950 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) | 6952 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) |