4 ** crypto.mod.php -- Squirrelspell module
6 ** Copyright (c) 1999-2002 The SquirrelMail development team
7 ** Licensed under the GNU GPL. For full terms see the file COPYING.
9 ** This module handles the encryption/decryption of the user dictionary
10 ** if the user so chooses from the options page.
15 // Declaring globals for E_ALL
16 global $action, $SQSPELL_CRYPTO;
19 // Let's encrypt the file.
20 $words=sqspell_getWords();
23 sqspell_writeWords($words);
25 _("Your personal dictionary has been <strong>encrypted</strong> and is now stored in an <strong>encrypted format</strong>.").
30 // Decrypt the file and save plain text.
31 $words=sqspell_getWords();
33 $SQSPELL_CRYPTO=false;
34 sqspell_writeWords($words);
36 _("Your personal dictionary has been <strong>decrypted</strong> and is now stored as <strong>clear text</strong>.") . '</p>';
40 // Wait, this shouldn't happen! :)
41 $msg = "<p>No action requested.</p>";
44 sqspell_makePage( _("Personal Dictionary Crypto Settings"), null, $msg);