From 33613a796b3f24671be3f6ac51831e06b5858428 Mon Sep 17 00:00:00 2001 From: David Seikel Date: Wed, 27 Apr 2011 19:12:01 +1000 Subject: Post merge cleanup. --- linden/indra/newview/llstartup.cpp | 36 ++++++++++++++++++++++++++++++++++++ linden/indra/newview/llstartup.h | 9 +++++++++ 2 files changed, 45 insertions(+) (limited to 'linden/indra') diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 66849b1..d035a4b 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -76,6 +76,7 @@ #include "llstring.h" #include "lluserrelations.h" #include "llvfs.h" +#include "llxorcipher.h" // saved password, MAC address #include "message.h" #include "v3math.h" @@ -261,6 +262,7 @@ bool LLStartUp::sLoginFailed = false; void login_show(); void login_callback(S32 option, void* userdata); +bool is_hex_string(U8* str, S32 len); void show_first_run_dialog(); bool first_run_dialog_callback(const LLSD& notification, const LLSD& response); void set_startup_status(const F32 frac, const std::string& string, const std::string& msg); @@ -3242,6 +3244,40 @@ void LLStartUp::deletePasswordFromDisk() LLFile::remove(filepath); } +bool is_hex_string(U8* str, S32 len) +{ + bool rv = true; + U8* c = str; + while(rv && len--) + { + switch(*c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case 'a': + case 'b': + case 'c': + case 'd': + case 'e': + case 'f': + ++c; + break; + default: + rv = false; + break; + } + } + return rv; +} + void show_first_run_dialog() { LLNotifications::instance().add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback); diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 5960817..619066c 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h @@ -106,7 +106,16 @@ public: // gender_name is either "male" or "female" static void loadInitialOutfit( const std::string& outfit_folder_name, const std::string& gender_name ); + + // Load MD5 of user's password from local disk file. + static std::string loadPasswordFromDisk(); + + // Record MD5 of user's password for subsequent login. + static void savePasswordToDisk(const std::string& hashed_password); + // Delete the saved password local disk file. + static void deletePasswordFromDisk(); + static bool dispatchURL(); // if we have a SLURL or sim string ("Ahern/123/45") that started // the viewer, dispatch it -- cgit v1.1