Complete the implementation of llSHA1String.
parent
6e63e93ec7
commit
ea6e4a95ce
|
@ -334,6 +334,17 @@ namespace OpenSim.Framework
|
||||||
return sb.ToString();
|
return sb.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Return an SHA1 hash of the given string
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="src"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static string SHA1Hash(string src)
|
||||||
|
{
|
||||||
|
SHA1CryptoServiceProvider SHA1 = new SHA1CryptoServiceProvider();
|
||||||
|
return BitConverter.ToString(SHA1.ComputeHash(Encoding.Default.GetBytes(src))).Replace("-", String.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
public static int fast_distance2d(int x, int y)
|
public static int fast_distance2d(int x, int y)
|
||||||
{
|
{
|
||||||
x = Math.Abs(x);
|
x = Math.Abs(x);
|
||||||
|
|
|
@ -5890,8 +5890,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_String llSHA1String(string src)
|
public LSL_String llSHA1String(string src)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
return ""; //ckrinke 1/27 This needs to return a proper hash.
|
return Util.SHA1Hash(src).ToLower();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist)
|
private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist)
|
||||||
{
|
{
|
||||||
ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
|
ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
|
||||||
|
|
Loading…
Reference in New Issue