7 * Copyright (c) 1999-2002 The SquirrelMail development team
8 * Licensed under the GNU GPL. For full terms see the file COPYING.
10 * This module handles the encryption/decryption of the user dictionary
11 * if the user so chooses from the options page.
15 * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
20 * Declaring globals for E_ALL
22 global $action, $SQSPELL_CRYPTO;
26 * Let's encrypt the file and save it in an encrypted format.
28 $words=sqspell_getWords();
30 * Flip the flag so the sqspell_writeWords function knows to encrypt
31 * the message before writing it to the disk.
35 * Call the function that does the actual encryption_decryption.
37 sqspell_writeWords($words);
39 . _("Your personal dictionary has been <strong>encrypted</strong> and is now stored in an <strong>encrypted format</strong>.")
44 * Let's decrypt the file and save it as plain text.
46 $words=sqspell_getWords();
48 * Flip the flag and tell the sqspell_writeWords() function that we
49 * want to save it plaintext.
51 $SQSPELL_CRYPTO=false;
52 sqspell_writeWords($words);
54 . _("Your personal dictionary has been <strong>decrypted</strong> and is now stored as <strong>clear text</strong>.")
60 * Wait, this shouldn't happen! :)
62 $msg = "<p>No action requested.</p>";
65 sqspell_makePage( _("Personal Dictionary Crypto Settings"), null, $msg);