[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [PATCH] KStringHandler::obscure
From:       Szombathelyi György <gyurco () freemail ! hu>
Date:       2003-11-25 18:12:28
[Download RAW message or body]

Tuesday 25 November 2003 09.18 dátummal Cornelius Schumacher ezt írta:
> On Monday 24 November 2003 20:46, Szombathelyi György wrote:
> > Here's a patch for KStringHandler::obscure(). Current version in CVS
> > doesn't work at all.
>
> What do you mean by "doesn't work at all"
>
> > My version also changes the algorithm somewhat, so
> > identical charaters will be encoded to different chars. I hope it's not a
> > problem, since the function is new in 3.2.
>
> The function is new in kdelibs, but the algorithm was used before. If you
> change it in a way that it can't correctly read what was written with the
> old algorithm many applications (e.g. KMail or KAddressBook) will loose
> their stored passwords. That's obviously not acceptable.

Ok, here's a new version which implements the same algorithm. I'm wondering 
that nobody has problems with the current code.

Regards,
György

____________________________________________________________________
Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol.
Probald ki most! http://www.freestart.hu

["kstringhandler.diff" (text/x-diff)]

--- kdecore/kstringhandler.cpp.old	2003-11-23 20:34:56.000000000 +0100
+++ kdecore/kstringhandler.cpp	2003-11-25 19:00:57.000000000 +0100
@@ -646,9 +646,8 @@
 {
   QString result;
   for ( uint i = 0; i < str.length(); ++i )
-    result += ( str.unicode()[ i ].unicode() < 0x20 ) ? str.unicode()[ i ] :
-        QChar( 0x1001F - str.unicode()[ i ] );
-
+    result += ( str[ i ].unicode() < 0x20 ) ? str[ i ] :
+        QChar( 0x1001F - str[ i ].unicode() );
   return result;
 }
 


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic