diff options
author | UbitUmarov | 2014-11-28 00:00:16 +0000 |
---|---|---|
committer | UbitUmarov | 2014-11-28 00:00:16 +0000 |
commit | 3b6191de7fd2dad8bdda8532d54992976fac9b35 (patch) | |
tree | edc47c297ee6764f5f051dd07bcae94e5751f376 /OpenSim/Region/ScriptEngine | |
parent | change/fix rez position and rotation on llRezObject and llRezAtRoot (diff) | |
parent | Add an XmlRpc method to get a region's root agent count. This is intended (diff) | |
download | opensim-SC-3b6191de7fd2dad8bdda8532d54992976fac9b35.zip opensim-SC-3b6191de7fd2dad8bdda8532d54992976fac9b35.tar.gz opensim-SC-3b6191de7fd2dad8bdda8532d54992976fac9b35.tar.bz2 opensim-SC-3b6191de7fd2dad8bdda8532d54992976fac9b35.tar.xz |
Merge branch 'master' into ubitworkmaster
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 15 |
1 files changed, 14 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 667a562..a5d8292 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8542,6 +8542,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8542 | 8542 | ||
8543 | public LSL_String llXorBase64Strings(string str1, string str2) | 8543 | public LSL_String llXorBase64Strings(string str1, string str2) |
8544 | { | 8544 | { |
8545 | int padding = 0; | ||
8546 | |||
8545 | string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | 8547 | string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
8546 | 8548 | ||
8547 | ScriptSleep(300); | 8549 | ScriptSleep(300); |
@@ -8585,6 +8587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8585 | // than the decoded length of s1, simply perform a normal | 8587 | // than the decoded length of s1, simply perform a normal |
8586 | // decode and XOR | 8588 | // decode and XOR |
8587 | // | 8589 | // |
8590 | /* | ||
8588 | if (data2.Length >= data1.Length) | 8591 | if (data2.Length >= data1.Length) |
8589 | { | 8592 | { |
8590 | for (int pos = 0 ; pos < data1.Length ; pos++ ) | 8593 | for (int pos = 0 ; pos < data1.Length ; pos++ ) |
@@ -8592,10 +8595,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8592 | 8595 | ||
8593 | return Convert.ToBase64String(data1); | 8596 | return Convert.ToBase64String(data1); |
8594 | } | 8597 | } |
8598 | */ | ||
8595 | 8599 | ||
8596 | // Remove padding | 8600 | // Remove padding |
8597 | while (str1.EndsWith("=")) | 8601 | while (str1.EndsWith("=")) |
8602 | { | ||
8598 | str1 = str1.Substring(0, str1.Length - 1); | 8603 | str1 = str1.Substring(0, str1.Length - 1); |
8604 | padding++; | ||
8605 | } | ||
8599 | while (str2.EndsWith("=")) | 8606 | while (str2.EndsWith("=")) |
8600 | str2 = str2.Substring(0, str2.Length - 1); | 8607 | str2 = str2.Substring(0, str2.Length - 1); |
8601 | 8608 | ||
@@ -8623,7 +8630,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8623 | for (int pos = 0 ; pos < d1.Length ; pos++) | 8630 | for (int pos = 0 ; pos < d1.Length ; pos++) |
8624 | output += b64[d1[pos] ^ d2[pos % d2.Length]]; | 8631 | output += b64[d1[pos] ^ d2[pos % d2.Length]]; |
8625 | 8632 | ||
8626 | while (output.Length % 3 > 0) | 8633 | // Here's a funny thing: LL blithely violate the base64 |
8634 | // standard pretty much everywhere. Here, padding is | ||
8635 | // added only if the first input string had it, rather | ||
8636 | // than when the data actually needs it. This can result | ||
8637 | // in invalid base64 being returned. Go figure. | ||
8638 | |||
8639 | while (padding-- > 0) | ||
8627 | output += "="; | 8640 | output += "="; |
8628 | 8641 | ||
8629 | return output; | 8642 | return output; |