simplify llStringToBase64 and llBase64ToString

Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
inv-download
Freaky Tech 2015-03-04 18:36:14 +01:00 committed by BlueWall
parent 061dd3385c
commit eacdad8405
1 changed files with 3 additions and 2 deletions

View File

@ -8228,7 +8228,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
try try
{ {
byte[] encData_byte = new byte[str.Length]; byte[] encData_byte;
encData_byte = Util.UTF8.GetBytes(str); encData_byte = Util.UTF8.GetBytes(str);
string encodedData = Convert.ToBase64String(encData_byte); string encodedData = Convert.ToBase64String(encData_byte);
return encodedData; return encodedData;
@ -8245,7 +8245,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
try try
{ {
return Util.Base64ToString(str); byte[] b = Convert.FromBase64String(str);
return Encoding.UTF8.GetString(b);
} }
catch catch
{ {