Yengine: use using...

This commit is contained in:
UbitUmarov
2018-11-20 23:07:14 +00:00
parent 3e5ca6efd6
commit fb0c8036f0
2 changed files with 14 additions and 10 deletions

View File

@@ -190,7 +190,8 @@ namespace OpenSim.Region.ScriptEngine.Yengine
// copy scripts or not.
byte[] scbytes = System.Text.Encoding.UTF8.GetBytes(m_SourceCode);
StringBuilder sb = new StringBuilder((256 + 5) / 6);
ByteArrayToSixbitStr(sb, System.Security.Cryptography.SHA256.Create().ComputeHash(scbytes));
using (System.Security.Cryptography.SHA256 sha = System.Security.Cryptography.SHA256.Create())
ByteArrayToSixbitStr(sb, sha.ComputeHash(scbytes));
m_ScriptObjCodeKey = sb.ToString();
// But source code can be just a sixbit string itself