Fixed the accidental double Crypt.

This commit is contained in:
Daniel Önnerby 2008-09-08 23:20:55 +00:00
parent a9185a9795
commit ec480b400a
3 changed files with 9 additions and 3 deletions

View File

@ -91,7 +91,7 @@ void MainMenuController::OnAddLibraryLocal(MenuItemRef menuItem)
void MainMenuController::OnAddLibraryRemote(MenuItemRef menuItem) void MainMenuController::OnAddLibraryRemote(MenuItemRef menuItem)
{ {
win32cpp::TopLevelWindow popupDialog(_T("Add remote library")); win32cpp::TopLevelWindow popupDialog(_T("Add remote library"));
popupDialog.SetMinimumSize(Size(300, 150)); popupDialog.SetMinimumSize(Size(300, 220));
dialog::AddLibraryController addLibrary(popupDialog,musik::core::LibraryFactory::Remote); dialog::AddLibraryController addLibrary(popupDialog,musik::core::LibraryFactory::Remote);

View File

@ -89,7 +89,13 @@ void AddLibraryController::OnOK(win32cpp::Button* button){
prefs.SetString("address",this->view->remoteHost->Caption().c_str()); prefs.SetString("address",this->view->remoteHost->Caption().c_str());
prefs.SetString("port",this->view->remotePort->Caption().c_str()); prefs.SetString("port",this->view->remotePort->Caption().c_str());
prefs.SetString("username",this->view->username->Caption().c_str()); prefs.SetString("username",this->view->username->Caption().c_str());
prefs.SetString("password",UTF8_TO_UTF(musik::core::Crypt::Encrypt(UTF_TO_UTF8(this->view->remotePort->Caption().c_str()),musik::core::Crypt::StaticSalt())).c_str());
utfstring password(
UTF8_TO_UTF(
musik::core::Crypt::Encrypt(
UTF_TO_UTF8(this->view->password->Caption()),musik::core::Crypt::StaticSalt())));
prefs.SetString("password",password.c_str());
} }
library->Startup(); library->Startup();

View File

@ -85,7 +85,7 @@ void EditUserController::OnOK(win32cpp::Button* button){
// TODO: Save user // TODO: Save user
this->server->CreateUser( this->server->CreateUser(
this->view->username->Caption(), this->view->username->Caption(),
UTF8_TO_UTF(musik::core::Crypt::Encrypt( musik::core::ConvertUTF8(this->view->password->Caption()),musik::core::Crypt::StaticSalt())), this->view->password->Caption(),
this->view->nickname->Caption() this->view->nickname->Caption()
); );