public virtual bool SetPassword(UUID principalID, string password)
        {
            string passwordSalt = Util.Md5Hash(UUID.Random().ToString());
            string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + passwordSalt);

            AuthenticationData auth = m_Database.Get(principalID);
            if (auth == null)
            {
                auth = new AuthenticationData();
                auth.PrincipalID = principalID;
                auth.Data = new System.Collections.Generic.Dictionary<string, object>();
                auth.Data["accountType"] = "UserAccount";
                auth.Data["webLoginKey"] = UUID.Zero.ToString();
            }
            auth.Data["passwordHash"] = md5PasswdHash;
            auth.Data["passwordSalt"] = passwordSalt;
            if (!m_Database.Store(auth))
            {
                m_log.DebugFormat("[AUTHENTICATION DB]: Failed to store authentication data");
                return false;
            }

            m_log.InfoFormat("[AUTHENTICATION DB]: Set password for principalID {0}", principalID);
            return true;
        }
 public bool Store(AuthenticationData data)
 {
     m_DataByUUID[data.PrincipalID] = data;
     return true;
 }
        public virtual bool SetAuthInfo(AuthInfo info)
        {
            AuthenticationData auth = new AuthenticationData();
            auth.PrincipalID = info.PrincipalID;
            auth.Data = new System.Collections.Generic.Dictionary<string, object>();
            auth.Data["accountType"] = info.AccountType;
            auth.Data["webLoginKey"] = info.WebLoginKey;
            auth.Data["passwordHash"] = info.PasswordHash;
            auth.Data["passwordSalt"] = info.PasswordSalt;

            if (!m_Database.Store(auth))
            {
                m_log.ErrorFormat("[AUTHENTICATION DB]: Failed to store authentication info.");
                return false;
            }

            m_log.DebugFormat("[AUTHENTICATION DB]: Set authentication info for principalID {0}", info.PrincipalID);
            return true;
        }