summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/pwmanager/germantranslation.txt4
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/kdepim/pwmanager/germantranslation.txt b/bin/kdepim/pwmanager/germantranslation.txt
index ccc9d83..2650e28 100644
--- a/bin/kdepim/pwmanager/germantranslation.txt
+++ b/bin/kdepim/pwmanager/germantranslation.txt
@@ -161,196 +161,200 @@
161{ "Wednesday","Mittwoch" }, 161{ "Wednesday","Mittwoch" },
162{ "Thursday","Donnerstag" }, 162{ "Thursday","Donnerstag" },
163{ "Friday","Freitag" }, 163{ "Friday","Freitag" },
164{ "Saturday","Samstag" }, 164{ "Saturday","Samstag" },
165{ "Sunday","Sonntag" }, 165{ "Sunday","Sonntag" },
166{ "Daylight end:","Sommerzeit Ende:" }, 166{ "Daylight end:","Sommerzeit Ende:" },
167{ "Time Zone","Zeit Zone" }, 167{ "Time Zone","Zeit Zone" },
168{ "Used Mail Client","Benutzter Mail Client" }, 168{ "Used Mail Client","Benutzter Mail Client" },
169{ "Channel:","Channel:" }, 169{ "Channel:","Channel:" },
170{ "Message:","Message:" }, 170{ "Message:","Message:" },
171{ "Parameters:","Parameter:" }, 171{ "Parameters:","Parameter:" },
172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" }, 172{ "HINT: Delimiter=; Name=%1,Email=%2","Hinweis: Begrenzer=; Name=%1,Email=%2" },
173{ "extra Message:","extra Message:" }, 173{ "extra Message:","extra Message:" },
174{ "extra Parameters:","extra Parameter:" }, 174{ "extra Parameters:","extra Parameter:" },
175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" }, 175{ "HINT: Emails=%1,Attachments=%2","Hinweis: Emails=%1,Attachments=%2" },
176{ "External Apps.","Externe Appl." }, 176{ "External Apps.","Externe Appl." },
177{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" }, 177{ "Your current storage dir is:\n%1\nYour mail is stored in:\n(storagedir)/apps/kopiemail/localmail","Aktuelles Speicherverzeichnis ist:\n%1\nIhre Mail wird gespeichert in:\n(speicherverz.)/apps/kopiemail/localmail" },
178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" }, 178{ "<b>New data storage dir:</b>","<b>Neues Datenspeicherverzeichnis:</b>" },
179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" }, 179{ "New dirs are created automatically","Neue Verzeichnisse werden aut. erstellt" },
180{ "Save settings","Speichere Einstellungen" }, 180{ "Save settings","Speichere Einstellungen" },
181{ "Save standard","Speichere Standard" }, 181{ "Save standard","Speichere Standard" },
182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" }, 182{ "<b>New settings are used\nafter a restart</b>","<b>Neue Einstellungen werden nach\neinem Neustart genutzt</b>" },
183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" }, 183{ "Settings are stored in\n%1","Einstellungen werden gespeichert in:\n%1" },
184{ "Data storage path","Daten Speicherpfad" }, 184{ "Data storage path","Daten Speicherpfad" },
185{ "Used %1 Client","Benutzer %1 Client" }, 185{ "Used %1 Client","Benutzer %1 Client" },
186{ "No email client installed","Keine Email Client installiert" }, 186{ "No email client installed","Keine Email Client installiert" },
187{ "Userdefined email client","Benutzerdef. Email Client" }, 187{ "Userdefined email client","Benutzerdef. Email Client" },
188{ "OM/Pi email client","OM/Pi Email Client" }, 188{ "OM/Pi email client","OM/Pi Email Client" },
189{ "URL:","URL:" }, 189{ "URL:","URL:" },
190{ "No","Nein" }, 190{ "No","Nein" },
191{ "Yes","Ja" }, 191{ "Yes","Ja" },
192{ "Untitled","Unbenannt" }, 192{ "Untitled","Unbenannt" },
193{ "&New","&Neu" }, 193{ "&New","&Neu" },
194{ "&Open","&Öffne" }, 194{ "&Open","&Öffne" },
195{ "&Close","Schließen" }, 195{ "&Close","Schließen" },
196{ "Save &as...","Speichere &als..." }, 196{ "Save &as...","Speichere &als..." },
197{ "&Text-file...","&Text-Datei..." }, 197{ "&Text-file...","&Text-Datei..." },
198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." }, 198{ "&Gpasman / Kpasman ...","&Gpasman / Kpasman ..." },
199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." }, 199{ "&CSV (Comma Separated Value) ...","&CSV (Komma getrennte Werte) ..." },
200{ "E&xport","E&xport" }, 200{ "E&xport","E&xport" },
201{ "I&mport","I&mport" }, 201{ "I&mport","I&mport" },
202{ "&Quit","Beenden" }, 202{ "&Quit","Beenden" },
203{ "&Add password","&Passwort hinzufügen" }, 203{ "&Add password","&Passwort hinzufügen" },
204{ "&Delete","Lösche" }, 204{ "&Delete","Lösche" },
205{ "Change &Master Password","Ändere &Master Passwort" }, 205{ "Change &Master Password","Ändere &Master Passwort" },
206{ "&Manage","Verwalte" }, 206{ "&Manage","Verwalte" },
207{ "&Find","&Finde" }, 207{ "&Find","&Finde" },
208{ "&Lock all entries","Sperre alle Einträge" }, 208{ "&Lock all entries","Sperre alle Einträge" },
209{ "&Deep-lock all entries","Sperre total alle Einträge" }, 209{ "&Deep-lock all entries","Sperre total alle Einträge" },
210{ "&Unlock all entries","Entsperre alle Einträge" }, 210{ "&Unlock all entries","Entsperre alle Einträge" },
211{ "&Configure...","Konfiguriere..." }, 211{ "&Configure...","Konfiguriere..." },
212{ "&Options","Konfig" }, 212{ "&Options","Konfig" },
213{ "C&ategories...","K&ategorien..." }, 213{ "C&ategories...","K&ategorien..." },
214{ "&Sync","&Sync" }, 214{ "&Sync","&Sync" },
215{ "&License","&Lizenz" }, 215{ "&License","&Lizenz" },
216{ "&Faq","&Faq" }, 216{ "&Faq","&Faq" },
217{ "&About PwManager","Über PwManager" }, 217{ "&About PwManager","Über PwManager" },
218{ "&Sync HowTo","&Sync HowTo" }, 218{ "&Sync HowTo","&Sync HowTo" },
219{ "&What's New","Was ist neu?" }, 219{ "&What's New","Was ist neu?" },
220{ "New","Neu" }, 220{ "New","Neu" },
221{ "Open","Öffnen" }, 221{ "Open","Öffnen" },
222{ "Save","Speichern" }, 222{ "Save","Speichern" },
223{ "Save as","Speichern als" }, 223{ "Save as","Speichern als" },
224{ "Print...","Drucke..." }, 224{ "Print...","Drucke..." },
225{ "Add password","Passwort hinzufügen" }, 225{ "Add password","Passwort hinzufügen" },
226{ "Edit password","Passwort ändern" }, 226{ "Edit password","Passwort ändern" },
227{ "Delete password","Passwort löschen" }, 227{ "Delete password","Passwort löschen" },
228{ "Find entry","Finde Eintrag" }, 228{ "Find entry","Finde Eintrag" },
229{ "Lock all entries","Sperre alle Einträge" }, 229{ "Lock all entries","Sperre alle Einträge" },
230{ "Deep-Lock all entries","Sperre total alle Einträge" }, 230{ "Deep-Lock all entries","Sperre total alle Einträge" },
231{ "Unlock all entries","Entsperre alle Einträge" }, 231{ "Unlock all entries","Entsperre alle Einträge" },
232{ "Categories:","Kategorien:" }, 232{ "Categories:","Kategorien:" },
233{ "&Rename","&Umbenennen" }, 233{ "&Rename","&Umbenennen" },
234{ "Username","Benutzername" }, 234{ "Username","Benutzername" },
235{ "Password","Passwort" }, 235{ "Password","Passwort" },
236{ "Launcher","Launcher" }, 236{ "Launcher","Launcher" },
237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" }, 237{ "copy password to clipboard","Kopiere Passwort ins Clipboard" },
238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" }, 238{ "copy username to clipboard","Kopiere Benutzername ins Clipboard" },
239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" }, 239{ "copy description to clipboard","Kopiere Beschreibung ins Clipboard" },
240{ "copy url to clipboard","Kopiere URL ins Clipboard" }, 240{ "copy url to clipboard","Kopiere URL ins Clipboard" },
241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" }, 241{ "copy launcher to clipboard","Kopiere Launcher ins Clipboard" },
242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" }, 242{ "copy comment to clipboard","Kopiere Kommentare ins Clipboard" },
243{ "Execute "Launcher"",""Launcher" ausführen" }, 243{ "Execute "Launcher"",""Launcher" ausführen" },
244{ "Go to "URL"","Gehe zu "URL"" }, 244{ "Go to "URL"","Gehe zu "URL"" },
245{ "Ready.","Fertig." }, 245{ "Ready.","Fertig." },
246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" }, 246{ "password filename(*.pwm)","passwort dateiname(*.pwm)" },
247{ "File error","Datei Fehler" }, 247{ "File error","Datei Fehler" },
248{ "Could not read file!","Kann Datei nicht lesen!" }, 248{ "Could not read file!","Kann Datei nicht lesen!" },
249{ "Master-password","Master-Passwort" }, 249{ "Master-password","Master-Passwort" },
250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" }, 250{ "Please enter the master-password:","Bitter Master-Passwort eingeben:" },
251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." }, 251{ "Wrong master-password!\nPlease try again.","Falsches Master-Passwort!\nBitte erneut versuchen." },
252{ "password error","Passwort Fehler" }, 252{ "password error","Passwort Fehler" },
253{ "Successfully opened file.","Datei erfolgreich geöffnet." }, 253{ "Successfully opened file.","Datei erfolgreich geöffnet." },
254{ "DEEP-LOCKED","TOTAL-GESPERRT" }, 254{ "DEEP-LOCKED","TOTAL-GESPERRT" },
255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." }, 255{ "This file is DEEP-LOCKED!\nThat means all data has been encrypted\nand written out to the file. If you want\nto see the entries, please UNLOCK the file.\nWhile unlocking, you will be prompted for the\nmaster-password or the key-card.","Diese Datei ist TOTAL-GESPERRT!\nDas bedeutet, dass alle Daten verschlüsselt\nsind und in die Datei geschrieben wurden.\nWenn Sie die Einträge sehen möchten\nENTSPERREN Sie bitte die Datei.\nZum Entsperren werden Sie nach\ndem Master-Passwort gefragt." },
256{ "<LOCKED>","<GESPERRT>" }, 256{ "<LOCKED>","<GESPERRT>" },
257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." }, 257{ "To unlock click the icon on the left.","Zum Entsperren auf linkes Icon klicken." },
258{ "PwManager","PwManager" }, 258{ "PwManager","PwManager" },
259{ "Window-style:","Window-Stil:" }, 259{ "Window-style:","Window-Stil:" },
260{ "Category on top","Kategorien oben" }, 260{ "Category on top","Kategorien oben" },
261{ "Category-list left/top","Kategorien links oben" }, 261{ "Category-list left/top","Kategorien links oben" },
262{ "Font for Password entries:","Schrift für Passwort Einträge:" }, 262{ "Font for Password entries:","Schrift für Passwort Einträge:" },
263{ "Font for Password summary:","Schrift für Passwort Übersicht:" }, 263{ "Font for Password summary:","Schrift für Passwort Übersicht:" },
264{ "Font:","Schriftart:" }, 264{ "Font:","Schriftart:" },
265{ "Summary","Übersicht" }, 265{ "Summary","Übersicht" },
266{ "Compression:","Kompression:" }, 266{ "Compression:","Kompression:" },
267{ "gzip","gzip" }, 267{ "gzip","gzip" },
268{ "Encryption:","Verschlüsselung:" }, 268{ "Encryption:","Verschlüsselung:" },
269{ "Blowfish (128 bit)","Blowfish (128 bit)" }, 269{ "Blowfish (128 bit)","Blowfish (128 bit)" },
270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" }, 270{ "AES-128, Rijndael (128 bit)","AES-128, Rijndael (128 bit)" },
271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" }, 271{ "AES-192, Rijndael (192 bit)","AES-192, Rijndael (192 bit)" },
272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" }, 272{ "AES-256, Rijndael (256 bit)","AES-256, Rijndael (256 bit)" },
273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" }, 273{ "Triple-DES (168 bit)","Triple-DES (168 bit)" },
274{ "Twofish (256 bit)","Twofish (256 bit)" }, 274{ "Twofish (256 bit)","Twofish (256 bit)" },
275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" }, 275{ "Twofish-128 (128 bit)","Twofish-128 (128 bit)" },
276{ "Hashing:","Hashing:" }, 276{ "Hashing:","Hashing:" },
277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" }, 277{ "SHA-160, SHA1 (160 bit)","SHA-160, SHA1 (160 bit)" },
278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" }, 278{ "SHA-256 (256 bit)","SHA-256 (256 bit)" },
279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" }, 279{ "SHA-384 (384 bit)","SHA-384 (384 bit)" },
280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" }, 280{ "SHA-512 (512 bit)","SHA-512 (512 bit)" },
281{ "MD5 (128 bit)","MD5 (128 bit)" }, 281{ "MD5 (128 bit)","MD5 (128 bit)" },
282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" }, 282{ "RIPE-MD-160 (160 bit)","RIPE-MD-160 (160 bit)" },
283{ "Tiger (192 bit)","Tiger (192 bit)" }, 283{ "Tiger (192 bit)","Tiger (192 bit)" },
284{ "Permissions:","Zugriffsrechte:" }, 284{ "Permissions:","Zugriffsrechte:" },
285{ "Make backup before saving","Mache Backup vor dem Speichern" }, 285{ "Make backup before saving","Mache Backup vor dem Speichern" },
286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" }, 286{ "Password timeout\n(timeout to hold password in\nmemory,so you don't have to\nre-enter it,if you\nalready have entered it)\n[set to 0 to disable]:","Passwort Timeout\n(Timeout um das Passwort\nim Speicher zu halten,\nso dass es nicht noch mal\neingegeben werden muß.)\n[Setze auf 0 zum deaktivieren]:" },
287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" }, 287{ "Auto-lock timeout\n(auto lock document after this\namount of seconds)\n[set to 0 to disable]:","(Total-)Sperr-Timeout\n(Sperre Dokument total nach\ndieser Anzahl Sekunden)\n[Setze auf 0 zum deaktivieren]:" },
288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" }, 288{ "deep-lock on autolock","Sperre total beim Sperr-Timeout" },
289{ "open deeplocked","Öffne total gesperrt" }, 289{ "open deeplocked","Öffne total gesperrt" },
290{ "Favourite browser:","Bevorzugter Browser:" }, 290{ "Favourite browser:","Bevorzugter Browser:" },
291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" }, 291{ "Favourite x-terminal:","Bevorzugtes x-terminal:" },
292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" }, 292{ "Open document with passwords unlocked","Öffne Dokument mit Passwort ungesperrt" },
293{ "Look && feel","Aussehen" }, 293{ "Look && feel","Aussehen" },
294{ "File","Datei" }, 294{ "File","Datei" },
295{ "Timeout","Timeout" }, 295{ "Timeout","Timeout" },
296{ "Autostart","Autostart" }, 296{ "Autostart","Autostart" },
297{ "External apps","Externe Applik." }, 297{ "External apps","Externe Applik." },
298{ "Miscellaneous","Verschiedenes" }, 298{ "Miscellaneous","Verschiedenes" },
299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" }, 299{ "+01:00 Europe/Oslo(CET)","+01:00 Europe/Oslo(CET)" },
300{ "edit category descriptions","Ändere Label für Kategorie" }, 300{ "edit category descriptions","Ändere Label für Kategorie" },
301{ "Close","Schließen" }, 301{ "Close","Schließen" },
302{ "Category:","Category:" }, 302{ "Category:","Category:" },
303{ "Text1 (Description):","Text1 (Beschreibung):" }, 303{ "Text1 (Description):","Text1 (Beschreibung):" },
304{ "Text2 (Username):","Text2 (Benutzername):" }, 304{ "Text2 (Username):","Text2 (Benutzername):" },
305{ "Text3 (Password):","Text3 (Passwort):" }, 305{ "Text3 (Password):","Text3 (Passwort):" },
306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" }, 306{ "edit/add a password entry","Ändere/hinzufüge Passwort Eintrag" },
307{ "Description:","Beschreibung:" }, 307{ "Description:","Beschreibung:" },
308{ "Username:","Benutzername:" }, 308{ "Username:","Benutzername:" },
309{ "Password:","Passwort:" }, 309{ "Password:","Passwort:" },
310{ "&Reveal","&Offen zeigen" }, 310{ "&Reveal","&Offen zeigen" },
311{ "&Generate","&Generiere" }, 311{ "&Generate","&Generiere" },
312{ "&Password","&Passwort" }, 312{ "&Password","&Passwort" },
313{ "&Comments","Kommentar" }, 313{ "&Comments","Kommentar" },
314{ "Launcher:","Launcher:" }, 314{ "Launcher:","Launcher:" },
315{ "$d = Description","$d = Beschreibung" }, 315{ "$d = Description","$d = Beschreibung" },
316{ "$n = Username","$n = Benutzername" }, 316{ "$n = Username","$n = Benutzername" },
317{ "$c = Comment","$c = Kommentar" }, 317{ "$c = Comment","$c = Kommentar" },
318{ "$u = URL","$u = URL" }, 318{ "$u = URL","$u = URL" },
319{ "$p = Password","$p = Passwort" }, 319{ "$p = Password","$p = Passwort" },
320{ "&Launcher","&Launcher" }, 320{ "&Launcher","&Launcher" },
321{ "Password generator","Passwort Generator" }, 321{ "Password generator","Passwort Generator" },
322{ "Character set:","Buchstaben Set:" }, 322{ "Character set:","Buchstaben Set:" },
323{ "Lowercase (abc)","Klein (abc)" }, 323{ "Lowercase (abc)","Klein (abc)" },
324{ "Uppercase (ABC)","Groß (ABC)" }, 324{ "Uppercase (ABC)","Groß (ABC)" },
325{ "Numbers (123)","Nummmern (123)" }, 325{ "Numbers (123)","Nummmern (123)" },
326{ "Special characters:","Spezielle Buchstaben:" }, 326{ "Special characters:","Spezielle Buchstaben:" },
327{ "Spaces (blank characters)","Leerzeichen" }, 327{ "Spaces (blank characters)","Leerzeichen" },
328{ "User defined:","Benutzer definiert:" }, 328{ "User defined:","Benutzer definiert:" },
329{ "Password Length:","Passwort Länge:" }, 329{ "Password Length:","Passwort Länge:" },
330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" }, 330{ "Enable Filtering to get better passwords","Enable Filtering to get better passwords" },
331{ "no password","Kein Passwort" }, 331{ "no password","Kein Passwort" },
332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." }, 332{ "Sorry, you haven't set a password.","Sorry, Sie haben kein Passwort angegeben." },
333{ "not saved, yet","not saved, yet" }, 333{ "not saved, yet","not saved, yet" },
334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." }, 334{ "Can't deep-lock, because the document\nhasn't been saved, yet. Please save\nto a file and try again.","Kann nicht tiefsperren, weil das\nDokument noch nicht gespeichert wurde.\nBitte speichern und noch einmal versuchen." },
335{ "Find","Finde" }, 335{ "Find","Finde" },
336{ "&Exact match","Genaue Übereinstimmung" }, 336{ "&Exact match","Genaue Übereinstimmung" },
337{ "&Case sensitive","Großschrift abhängig" }, 337{ "&Case sensitive","Großschrift abhängig" },
338{ "Search in Column","Suche in Spalten" }, 338{ "Search in Column","Suche in Spalten" },
339{ "&Description","Beschreibung" }, 339{ "&Description","Beschreibung" },
340{ "C&omment","Kommentar" }, 340{ "C&omment","Kommentar" },
341{ "&Username","Benutzername" }, 341{ "&Username","Benutzername" },
342{ "U&RL","URL" }, 342{ "U&RL","URL" },
343{ "delete?","Löschen?" }, 343{ "delete?","Löschen?" },
344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" }, 344{ "Do you really want to delete\nthe selected entry","Wollen Sie wirklich\nden Eintrag löschen:" },
345{ "Save?","Speichern?" }, 345{ "Save?","Speichern?" },
346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" }, 346{ ""\nhas been modified.\nDo you want to save it?",""\nwurde geändert.\nMöchten Sie speichern?" },
347{ "The list\n "","Die Liste\n "" }, 347{ "The list\n "","Die Liste\n "" },
348{ "nothing to do","Nichts zu tun" }, 348{ "nothing to do","Nichts zu tun" },
349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." }, 349{ "Sorry, there's nothing to save.\nPlease first add some passwords.","Sorry, es gibt nichts zu speichern.\nBitte erst Passwörter hinzufügen." },
350{ "Add new password","Passwort hinzufügen" }, 350{ "Add new password","Passwort hinzufügen" },
351{ "Successfully saved data.","Datei gespeichert." }, 351{ "Successfully saved data.","Datei gespeichert." },
352{ "Category:","Kategorie:" }, 352{ "Category:","Kategorie:" },
353{ "LOCKED","GESPERRT" },
354{ "","" },
355{ "","" },
356{ "","" },
353{ "","" }, 357{ "","" },
354{ "","" }, 358{ "","" },
355{ "","" }, 359{ "","" },
356 360
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index 6fbe110..61f2616 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -1101,385 +1101,385 @@ bool PwMDoc::delEntry(unsigned int category, unsigned int index, bool dontFlagDi
1101 return true; 1101 return true;
1102 } 1102 }
1103 for (i = 0; i < entries; ++i) { 1103 for (i = 0; i < entries; ++i) {
1104 // decrement all listViewPositions that are greater than the deleted. 1104 // decrement all listViewPositions that are greater than the deleted.
1105 if (dti.dta[category].d[i].listViewPos > lvPos) 1105 if (dti.dta[category].d[i].listViewPos > lvPos)
1106 --dti.dta[category].d[i].listViewPos; 1106 --dti.dta[category].d[i].listViewPos;
1107 } 1107 }
1108 1108
1109 if (!dontFlagDirty) 1109 if (!dontFlagDirty)
1110 flagDirty(); 1110 flagDirty();
1111 return true; 1111 return true;
1112} 1112}
1113 1113
1114bool PwMDoc::editEntry(const QString &oldCategory, const QString &newCategory, 1114bool PwMDoc::editEntry(const QString &oldCategory, const QString &newCategory,
1115 unsigned int index, PwMDataItem *d, bool updateMeta) 1115 unsigned int index, PwMDataItem *d, bool updateMeta)
1116{ 1116{
1117 PWM_ASSERT(d); 1117 PWM_ASSERT(d);
1118 unsigned int oldCat = 0; 1118 unsigned int oldCat = 0;
1119 1119
1120 if (!findCategory(oldCategory, &oldCat)) { 1120 if (!findCategory(oldCategory, &oldCat)) {
1121 BUG(); 1121 BUG();
1122 return false; 1122 return false;
1123 } 1123 }
1124 1124
1125 return editEntry(oldCat, newCategory, index, d, updateMeta); 1125 return editEntry(oldCat, newCategory, index, d, updateMeta);
1126} 1126}
1127 1127
1128bool PwMDoc::editEntry(unsigned int oldCategory, const QString &newCategory, 1128bool PwMDoc::editEntry(unsigned int oldCategory, const QString &newCategory,
1129 unsigned int index, PwMDataItem *d, bool updateMeta) 1129 unsigned int index, PwMDataItem *d, bool updateMeta)
1130{ 1130{
1131 if (isDeepLocked()) 1131 if (isDeepLocked())
1132 return false; 1132 return false;
1133 if (updateMeta) { 1133 if (updateMeta) {
1134 d->meta.update = QDateTime::currentDateTime(); 1134 d->meta.update = QDateTime::currentDateTime();
1135 if (d->meta.create.isNull()) { 1135 if (d->meta.create.isNull()) {
1136 d->meta.create = d->meta.update; 1136 d->meta.create = d->meta.update;
1137 } 1137 }
1138 } 1138 }
1139 if (dti.dta[oldCategory].name != newCategory.latin1()) { 1139 if (dti.dta[oldCategory].name != newCategory.latin1()) {
1140 // the user changed the category. 1140 // the user changed the category.
1141 PwMerror ret; 1141 PwMerror ret;
1142 d->rev = 0; 1142 d->rev = 0;
1143 ret = addEntry(newCategory, d, true, false); 1143 ret = addEntry(newCategory, d, true, false);
1144 if (ret != e_success) 1144 if (ret != e_success)
1145 return false; 1145 return false;
1146 if (!delEntry(oldCategory, index, true)) 1146 if (!delEntry(oldCategory, index, true))
1147 return false; 1147 return false;
1148 } else { 1148 } else {
1149 d->rev = dti.dta[oldCategory].d[index].rev + 1; // increment revision counter. 1149 d->rev = dti.dta[oldCategory].d[index].rev + 1; // increment revision counter.
1150 dti.dta[oldCategory].d[index] = *d; 1150 dti.dta[oldCategory].d[index] = *d;
1151 } 1151 }
1152 flagDirty(); 1152 flagDirty();
1153 return true; 1153 return true;
1154} 1154}
1155 1155
1156unsigned int PwMDoc::numEntries(const QString &category) 1156unsigned int PwMDoc::numEntries(const QString &category)
1157{ 1157{
1158 unsigned int cat = 0; 1158 unsigned int cat = 0;
1159 1159
1160 if (!findCategory(category, &cat)) { 1160 if (!findCategory(category, &cat)) {
1161 BUG(); 1161 BUG();
1162 return 0; 1162 return 0;
1163 } 1163 }
1164 1164
1165 return numEntries(cat); 1165 return numEntries(cat);
1166} 1166}
1167 1167
1168bool PwMDoc::serializeDta(string *d) 1168bool PwMDoc::serializeDta(string *d)
1169{ 1169{
1170 PWM_ASSERT(d); 1170 PWM_ASSERT(d);
1171 Serializer ser; 1171 Serializer ser;
1172 if (!ser.serialize(dti)) 1172 if (!ser.serialize(dti))
1173 return false; 1173 return false;
1174 d->assign(ser.getXml()); 1174 d->assign(ser.getXml());
1175 if (!d->size()) 1175 if (!d->size())
1176 return false; 1176 return false;
1177 return true; 1177 return true;
1178} 1178}
1179 1179
1180bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked) 1180bool PwMDoc::deSerializeDta(const string *d, bool entriesLocked)
1181{ 1181{
1182 PWM_ASSERT(d); 1182 PWM_ASSERT(d);
1183#ifndef PWM_EMBEDDED 1183#ifndef PWM_EMBEDDED
1184 try { 1184 try {
1185 1185
1186 Serializer ser(d->c_str()); 1186 Serializer ser(d->c_str());
1187 ser.setDefaultLockStat(entriesLocked); 1187 ser.setDefaultLockStat(entriesLocked);
1188 if (!ser.deSerialize(&dti)) 1188 if (!ser.deSerialize(&dti))
1189 return false; 1189 return false;
1190 } catch (PwMException) { 1190 } catch (PwMException) {
1191 return false; 1191 return false;
1192 } 1192 }
1193#else 1193#else
1194 Serializer ser(d->c_str()); 1194 Serializer ser(d->c_str());
1195 ser.setDefaultLockStat(entriesLocked); 1195 ser.setDefaultLockStat(entriesLocked);
1196 if (!ser.deSerialize(&dti)) 1196 if (!ser.deSerialize(&dti))
1197 return false; 1197 return false;
1198#endif 1198#endif
1199 1199
1200 emitDataChanged(this); 1200 emitDataChanged(this);
1201 return true; 1201 return true;
1202} 1202}
1203 1203
1204bool PwMDoc::getEntry(const QString &category, unsigned int index, 1204bool PwMDoc::getEntry(const QString &category, unsigned int index,
1205 PwMDataItem * d, bool unlockIfLocked) 1205 PwMDataItem * d, bool unlockIfLocked)
1206{ 1206{
1207 PWM_ASSERT(d); 1207 PWM_ASSERT(d);
1208 unsigned int cat = 0; 1208 unsigned int cat = 0;
1209 1209
1210 if (!findCategory(category, &cat)) { 1210 if (!findCategory(category, &cat)) {
1211 BUG(); 1211 BUG();
1212 return false; 1212 return false;
1213 } 1213 }
1214 1214
1215 return getEntry(cat, index, d, unlockIfLocked); 1215 return getEntry(cat, index, d, unlockIfLocked);
1216} 1216}
1217 1217
1218bool PwMDoc::getEntry(unsigned int category, unsigned int index, 1218bool PwMDoc::getEntry(unsigned int category, unsigned int index,
1219 PwMDataItem *d, bool unlockIfLocked) 1219 PwMDataItem *d, bool unlockIfLocked)
1220{ 1220{
1221 if (index > dti.dta[category].d.size() - 1) 1221 if (index > dti.dta[category].d.size() - 1)
1222 return false; 1222 return false;
1223 1223
1224 bool locked = isLocked(category, index); 1224 bool locked = isLocked(category, index);
1225 if (locked) { 1225 if (locked) {
1226 /* this entry is locked. We don't return a password, 1226 /* this entry is locked. We don't return a password,
1227 * until it's unlocked by the user by inserting 1227 * until it's unlocked by the user by inserting
1228 * chipcard or entering the mpw 1228 * chipcard or entering the mpw
1229 */ 1229 */
1230 if (unlockIfLocked) { 1230 if (unlockIfLocked) {
1231 if (!lockAt(category, index, false)) { 1231 if (!lockAt(category, index, false)) {
1232 return false; 1232 return false;
1233 } 1233 }
1234 locked = false; 1234 locked = false;
1235 } 1235 }
1236 } 1236 }
1237 1237
1238 *d = dti.dta[category].d[index]; 1238 *d = dti.dta[category].d[index];
1239 if (locked) 1239 if (locked)
1240 d->pw = LOCKED_STRING.latin1(); 1240 d->pw = LOCKED_STRING.latin1();
1241 1241
1242 return true; 1242 return true;
1243} 1243}
1244PwMerror PwMDoc::getCommentByLvp(const QString &category, int listViewPos, 1244PwMerror PwMDoc::getCommentByLvp(const QString &category, int listViewPos,
1245 string *foundComment) 1245 string *foundComment)
1246{ 1246{
1247 PWM_ASSERT(foundComment); 1247 PWM_ASSERT(foundComment);
1248 unsigned int cat = 0; 1248 unsigned int cat = 0;
1249 1249
1250 if (!findCategory(category, &cat)) 1250 if (!findCategory(category, &cat))
1251 return e_invalidArg; 1251 return e_invalidArg;
1252 1252
1253 unsigned int i, entries = numEntries(cat); 1253 unsigned int i, entries = numEntries(cat);
1254 for (i = 0; i < entries; ++i) { 1254 for (i = 0; i < entries; ++i) {
1255 if (dti.dta[cat].d[i].listViewPos == listViewPos) { 1255 if (dti.dta[cat].d[i].listViewPos == listViewPos) {
1256 *foundComment = dti.dta[cat].d[i].comment; 1256 *foundComment = dti.dta[cat].d[i].comment;
1257 if (dti.dta[cat].d[i].binary) 1257 if (dti.dta[cat].d[i].binary)
1258 return e_binEntry; 1258 return e_binEntry;
1259 return e_normalEntry; 1259 return e_normalEntry;
1260 } 1260 }
1261 } 1261 }
1262 BUG(); 1262 BUG();
1263 return e_generic; 1263 return e_generic;
1264} 1264}
1265 1265
1266PwMerror PwMDoc::getCommentByLvp_long(const QString &category, int listViewPos, 1266PwMerror PwMDoc::getCommentByLvp_long(const QString &category, int listViewPos,
1267 string *foundComment) 1267 string *foundComment)
1268{ 1268{
1269 PWM_ASSERT(foundComment); 1269 PWM_ASSERT(foundComment);
1270 unsigned int cat = 0; 1270 unsigned int cat = 0;
1271 1271
1272 if (!findCategory(category, &cat)) 1272 if (!findCategory(category, &cat))
1273 return e_invalidArg; 1273 return e_invalidArg;
1274 1274
1275 unsigned int i, entries = numEntries(cat); 1275 unsigned int i, entries = numEntries(cat);
1276 for (i = 0; i < entries; ++i) { 1276 for (i = 0; i < entries; ++i) {
1277 if (dti.dta[cat].d[i].listViewPos == listViewPos) { 1277 if (dti.dta[cat].d[i].listViewPos == listViewPos) {
1278 if (dti.dta[cat].d[i].binary) 1278 if (dti.dta[cat].d[i].binary)
1279 return e_binEntry; 1279 return e_binEntry;
1280 PwMCategoryItem* catItem = getCategoryEntry(cat); 1280 PwMCategoryItem* catItem = getCategoryEntry(cat);
1281 QString retval; 1281 QString retval;
1282 QString tempval = QString (dti.dta[cat].d[i].desc.c_str()); 1282 QString tempval = QString (dti.dta[cat].d[i].desc.c_str());
1283 if ( !tempval.isEmpty() ) { 1283 if ( !tempval.isEmpty() ) {
1284 retval += "<b>" +QString ( catItem->desc_text.c_str() )+ ":</b> "+ tempval+"<br>" ; 1284 retval += "<b>" +QString ( catItem->desc_text.c_str() )+ ":</b> "+ tempval+"<br>" ;
1285 } 1285 }
1286 tempval = QString (dti.dta[cat].d[i].name.c_str()); 1286 tempval = QString (dti.dta[cat].d[i].name.c_str());
1287 if ( !tempval.isEmpty() ) { 1287 if ( !tempval.isEmpty() ) {
1288 retval += "<b>" +QString ( catItem->name_text.c_str() ) + ":</b> "+ tempval+"<br>" ; 1288 retval += "<b>" +QString ( catItem->name_text.c_str() ) + ":</b> "+ tempval+"<br>" ;
1289 } 1289 }
1290 tempval = QString (dti.dta[cat].d[i].pw.c_str()); 1290 tempval = QString (dti.dta[cat].d[i].pw.c_str());
1291 if ( !tempval.isEmpty() ) { 1291 if ( !tempval.isEmpty() ) {
1292 if ( dti.dta[cat].d[i].lockStat ) 1292 if ( dti.dta[cat].d[i].lockStat )
1293 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ":</b> " + i18n("<LOCKED>") +"<br>" ; 1293 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ": " + i18n("LOCKED") +"</b><br>" ;
1294 else 1294 else
1295 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ":</b> " + tempval+"<br>" ; 1295 retval += "<b>" +QString ( catItem->pw_text.c_str() )+ ":</b> " + tempval+"<br>" ;
1296 } 1296 }
1297 tempval = QString (dti.dta[cat].d[i].url.c_str()); 1297 tempval = QString (dti.dta[cat].d[i].url.c_str());
1298 if ( !tempval.isEmpty() ) { 1298 if ( !tempval.isEmpty() ) {
1299 retval += "<b>" +i18n("URL:")+ "</b> " + tempval+"<br>" ; 1299 retval += "<b>" +i18n("URL:")+ "</b> " + tempval+"<br>" ;
1300 } 1300 }
1301 tempval = QString (dti.dta[cat].d[i].launcher.c_str()); 1301 tempval = QString (dti.dta[cat].d[i].launcher.c_str());
1302 if ( !tempval.isEmpty() ) { 1302 if ( !tempval.isEmpty() ) {
1303 retval += "<b>" +i18n("Launcher:")+ "</b> " + tempval+"<br>" ; 1303 retval += "<b>" +i18n("Launcher:")+ "</b> " + tempval+"<br>" ;
1304 } 1304 }
1305 tempval = QString (dti.dta[cat].d[i].comment.c_str()); 1305 tempval = QString (dti.dta[cat].d[i].comment.c_str());
1306 if ( !tempval.isEmpty() ) { 1306 if ( !tempval.isEmpty() ) {
1307 tempval.replace(QRegExp ( "\n" ), "<br>" ); 1307 tempval.replace(QRegExp ( "\n" ), "<br>" );
1308 retval += "<b>" +i18n("Comment:")+ "</b><br>" + tempval+"<br>" ; 1308 retval += "<b>" +i18n("Comment:")+ "</b><br>" + tempval+"<br>" ;
1309 } 1309 }
1310 1310
1311 string ret ( retval.latin1() ); 1311 string ret ( retval.latin1() );
1312 1312
1313 1313
1314 // *foundComment = dti.dta[cat].d[i].comment; 1314 // *foundComment = dti.dta[cat].d[i].comment;
1315 *foundComment = ret; 1315 *foundComment = ret;
1316 return e_normalEntry; 1316 return e_normalEntry;
1317 } 1317 }
1318 } 1318 }
1319 BUG(); 1319 BUG();
1320 return e_generic; 1320 return e_generic;
1321} 1321}
1322 1322
1323bool PwMDoc::compressDta(string *d, char algo) 1323bool PwMDoc::compressDta(string *d, char algo)
1324{ 1324{
1325 PWM_ASSERT(d); 1325 PWM_ASSERT(d);
1326 switch (algo) { 1326 switch (algo) {
1327 case PWM_COMPRESS_GZIP: { 1327 case PWM_COMPRESS_GZIP: {
1328 CompressGzip comp; 1328 CompressGzip comp;
1329 return comp.compress(d); 1329 return comp.compress(d);
1330 } 1330 }
1331#ifndef PWM_EMBEDDED 1331#ifndef PWM_EMBEDDED
1332 case PWM_COMPRESS_BZIP2: { 1332 case PWM_COMPRESS_BZIP2: {
1333 CompressBzip2 comp; 1333 CompressBzip2 comp;
1334 return comp.compress(d); 1334 return comp.compress(d);
1335 } 1335 }
1336#endif 1336#endif
1337 case PWM_COMPRESS_NONE: { 1337 case PWM_COMPRESS_NONE: {
1338 return true; 1338 return true;
1339 } default: { 1339 } default: {
1340 BUG(); 1340 BUG();
1341 } 1341 }
1342 } 1342 }
1343 return false; 1343 return false;
1344} 1344}
1345 1345
1346bool PwMDoc::decompressDta(string *d, char algo) 1346bool PwMDoc::decompressDta(string *d, char algo)
1347{ 1347{
1348 PWM_ASSERT(d); 1348 PWM_ASSERT(d);
1349 switch (algo) { 1349 switch (algo) {
1350 case PWM_COMPRESS_GZIP: { 1350 case PWM_COMPRESS_GZIP: {
1351 CompressGzip comp; 1351 CompressGzip comp;
1352 return comp.decompress(d); 1352 return comp.decompress(d);
1353 } 1353 }
1354#ifndef PWM_EMBEDDED 1354#ifndef PWM_EMBEDDED
1355 case PWM_COMPRESS_BZIP2: { 1355 case PWM_COMPRESS_BZIP2: {
1356 CompressBzip2 comp; 1356 CompressBzip2 comp;
1357 return comp.decompress(d); 1357 return comp.decompress(d);
1358 } 1358 }
1359#endif 1359#endif
1360 case PWM_COMPRESS_NONE: { 1360 case PWM_COMPRESS_NONE: {
1361 return true; 1361 return true;
1362 } 1362 }
1363 } 1363 }
1364 return false; 1364 return false;
1365} 1365}
1366 1366
1367PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo, 1367PwMerror PwMDoc::encrypt(string *d, const QString *pw, QFile *f, char algo,
1368 char hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase 1368 char hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
1369) 1369)
1370{ 1370{
1371 PWM_ASSERT(d); 1371 PWM_ASSERT(d);
1372 PWM_ASSERT(pw); 1372 PWM_ASSERT(pw);
1373 PWM_ASSERT(f); 1373 PWM_ASSERT(f);
1374 1374
1375 size_t encSize; 1375 size_t encSize;
1376 byte *encrypted = 0; 1376 byte *encrypted = 0;
1377 1377
1378 switch (algo) { 1378 switch (algo) {
1379 case PWM_CRYPT_BLOWFISH: { 1379 case PWM_CRYPT_BLOWFISH: {
1380 Blowfish::padNull(d); 1380 Blowfish::padNull(d);
1381 encSize = d->length(); 1381 encSize = d->length();
1382 encrypted = new byte[encSize]; 1382 encrypted = new byte[encSize];
1383 Blowfish bf; 1383 Blowfish bf;
1384 if (bf.bf_setkey((byte *) pw->latin1(), pw->length())) { 1384 if (bf.bf_setkey((byte *) pw->latin1(), pw->length())) {
1385 delete [] encrypted; 1385 delete [] encrypted;
1386 return e_weakPw; 1386 return e_weakPw;
1387 } 1387 }
1388 bf.bf_encrypt((byte *) encrypted, (byte *) d->c_str(), encSize); 1388 bf.bf_encrypt((byte *) encrypted, (byte *) d->c_str(), encSize);
1389 break; 1389 break;
1390 } 1390 }
1391 case PWM_CRYPT_AES128: 1391 case PWM_CRYPT_AES128:
1392 /*... fall through */ 1392 /*... fall through */
1393 case PWM_CRYPT_AES192: 1393 case PWM_CRYPT_AES192:
1394 case PWM_CRYPT_AES256: 1394 case PWM_CRYPT_AES256:
1395 case PWM_CRYPT_3DES: 1395 case PWM_CRYPT_3DES:
1396 case PWM_CRYPT_TWOFISH: 1396 case PWM_CRYPT_TWOFISH:
1397 case PWM_CRYPT_TWOFISH128: { 1397 case PWM_CRYPT_TWOFISH128: {
1398 if (!LibGCryptIf::available()) 1398 if (!LibGCryptIf::available())
1399 return e_cryptNotImpl; 1399 return e_cryptNotImpl;
1400 LibGCryptIf gc; 1400 LibGCryptIf gc;
1401 PwMerror err; 1401 PwMerror err;
1402 unsigned char *plain = new unsigned char[d->length() + 1024]; 1402 unsigned char *plain = new unsigned char[d->length() + 1024];
1403 memcpy(plain, d->c_str(), d->length()); 1403 memcpy(plain, d->c_str(), d->length());
1404 err = gc.encrypt(&encrypted, 1404 err = gc.encrypt(&encrypted,
1405 &encSize, 1405 &encSize,
1406 plain, 1406 plain,
1407 d->length(), 1407 d->length(),
1408 reinterpret_cast<const unsigned char *>(pw->latin1()), 1408 reinterpret_cast<const unsigned char *>(pw->latin1()),
1409 pw->length(), 1409 pw->length(),
1410 algo, 1410 algo,
1411 hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase 1411 hashalgo //US BUG: pass _hashalgo because we need it in hashPassphrase
1412 ); 1412 );
1413 delete [] plain; 1413 delete [] plain;
1414 if (err != e_success) 1414 if (err != e_success)
1415 return e_cryptNotImpl; 1415 return e_cryptNotImpl;
1416 break; 1416 break;
1417 } 1417 }
1418 default: { 1418 default: {
1419 delete_ifnot_null_array(encrypted); 1419 delete_ifnot_null_array(encrypted);
1420 return e_cryptNotImpl; 1420 return e_cryptNotImpl;
1421 } } 1421 } }
1422 1422
1423 // write encrypted data to file 1423 // write encrypted data to file
1424 if (f->writeBlock(reinterpret_cast<const char *>(encrypted), 1424 if (f->writeBlock(reinterpret_cast<const char *>(encrypted),
1425 static_cast<Q_ULONG>(encSize)) 1425 static_cast<Q_ULONG>(encSize))
1426 != static_cast<Q_LONG>(encSize)) { 1426 != static_cast<Q_LONG>(encSize)) {
1427 delete_ifnot_null_array(encrypted); 1427 delete_ifnot_null_array(encrypted);
1428 return e_writeFile; 1428 return e_writeFile;
1429 } 1429 }
1430 delete_ifnot_null_array(encrypted); 1430 delete_ifnot_null_array(encrypted);
1431 return e_success; 1431 return e_success;
1432} 1432}
1433 1433
1434PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw, 1434PwMerror PwMDoc::decrypt(string *d, unsigned int pos, const QString *pw,
1435 char algo, 1435 char algo,
1436 char hashalgo, //US BUG: pass _hashalgo because we need it in hashPassphrase 1436 char hashalgo, //US BUG: pass _hashalgo because we need it in hashPassphrase
1437 QFile *f) 1437 QFile *f)
1438{ 1438{
1439 PWM_ASSERT(d); 1439 PWM_ASSERT(d);
1440 PWM_ASSERT(pw); 1440 PWM_ASSERT(pw);
1441 PWM_ASSERT(f); 1441 PWM_ASSERT(f);
1442 1442
1443 unsigned int cryptLen = f->size() - pos; 1443 unsigned int cryptLen = f->size() - pos;
1444 byte *encrypted = new byte[cryptLen]; 1444 byte *encrypted = new byte[cryptLen];
1445 byte *decrypted = new byte[cryptLen]; 1445 byte *decrypted = new byte[cryptLen];
1446 1446
1447 f->at(pos); 1447 f->at(pos);
1448#ifndef PWM_EMBEDDED 1448#ifndef PWM_EMBEDDED
1449 if (f->readBlock(reinterpret_cast<char *>(encrypted), 1449 if (f->readBlock(reinterpret_cast<char *>(encrypted),
1450 static_cast<Q_ULONG>(cryptLen)) 1450 static_cast<Q_ULONG>(cryptLen))
1451 != static_cast<Q_LONG>(cryptLen)) { 1451 != static_cast<Q_LONG>(cryptLen)) {
1452 delete [] encrypted; 1452 delete [] encrypted;
1453 delete [] decrypted; 1453 delete [] decrypted;
1454 return e_readFile; 1454 return e_readFile;
1455 } 1455 }
1456#else 1456#else
1457 if (f->readBlock((char *)(encrypted), 1457 if (f->readBlock((char *)(encrypted),
1458 (unsigned long)(cryptLen)) 1458 (unsigned long)(cryptLen))
1459 != (long)(cryptLen)) { 1459 != (long)(cryptLen)) {
1460 delete [] encrypted; 1460 delete [] encrypted;
1461 delete [] decrypted; 1461 delete [] decrypted;
1462 return e_readFile; 1462 return e_readFile;
1463 } 1463 }
1464#endif 1464#endif
1465 switch (algo) { 1465 switch (algo) {
1466 case PWM_CRYPT_BLOWFISH: { 1466 case PWM_CRYPT_BLOWFISH: {
1467 Blowfish bf; 1467 Blowfish bf;
1468 bf.bf_setkey((byte *) pw->latin1(), pw->length()); 1468 bf.bf_setkey((byte *) pw->latin1(), pw->length());
1469 bf.bf_decrypt(decrypted, encrypted, cryptLen); 1469 bf.bf_decrypt(decrypted, encrypted, cryptLen);
1470 break; 1470 break;
1471 } 1471 }
1472 case PWM_CRYPT_AES128: 1472 case PWM_CRYPT_AES128:
1473 /*... fall through */ 1473 /*... fall through */
1474 case PWM_CRYPT_AES192: 1474 case PWM_CRYPT_AES192:
1475 case PWM_CRYPT_AES256: 1475 case PWM_CRYPT_AES256:
1476 case PWM_CRYPT_3DES: 1476 case PWM_CRYPT_3DES:
1477 case PWM_CRYPT_TWOFISH: 1477 case PWM_CRYPT_TWOFISH:
1478 case PWM_CRYPT_TWOFISH128: { 1478 case PWM_CRYPT_TWOFISH128: {
1479 if (!LibGCryptIf::available()) 1479 if (!LibGCryptIf::available())
1480 return e_cryptNotImpl; 1480 return e_cryptNotImpl;
1481 LibGCryptIf gc; 1481 LibGCryptIf gc;
1482 PwMerror err; 1482 PwMerror err;
1483 err = gc.decrypt(&decrypted, 1483 err = gc.decrypt(&decrypted,
1484 &cryptLen, 1484 &cryptLen,
1485 encrypted, 1485 encrypted,