From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- OpenSim/Framework/Data.SQLite/SQLiteGridData.cs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'OpenSim/Framework/Data.SQLite/SQLiteGridData.cs') diff --git a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs index 800e26c..511c5f0 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteGridData.cs @@ -27,8 +27,10 @@ */ using System; using System.Collections.Generic; +using System.Data; +using System.Security.Cryptography; using System.Text; -using OpenSim.Framework.Data; +using libsecondlife; namespace OpenSim.Framework.Data.SQLite { @@ -99,8 +101,8 @@ namespace OpenSim.Framework.Data.SQLite Dictionary param = new Dictionary(); param["handle"] = handle.ToString(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -114,13 +116,13 @@ namespace OpenSim.Framework.Data.SQLite /// /// The region UUID /// The sim profile - public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) + public SimProfileData GetProfileByLLUUID(LLUUID uuid) { Dictionary param = new Dictionary(); param["uuid"] = uuid.ToStringHyphenated(); - System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); - System.Data.IDataReader reader = result.ExecuteReader(); + IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); + IDataReader reader = result.ExecuteReader(); SimProfileData row = database.getRow(reader); reader.Close(); @@ -153,7 +155,7 @@ namespace OpenSim.Framework.Data.SQLite /// The attempted regionHandle of the challenger /// The secret /// Whether the secret and regionhandle match the database entry for UUID - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) { bool throwHissyFit = false; // Should be true by 1.0 @@ -174,10 +176,10 @@ namespace OpenSim.Framework.Data.SQLite /// /// /// - public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) + public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) { - System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); - System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); + SHA512Managed HashProvider = new SHA512Managed(); + ASCIIEncoding TextProvider = new ASCIIEncoding(); byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); byte[] hash = HashProvider.ComputeHash(stream); -- cgit v1.1