7 * Copyright (c) 1999-2003 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 $SQSPELL_CRYPTO;
24 switch ($_POST['action']){
27 * Let's encrypt the file and save it in an encrypted format.
29 $words=sqspell_getWords();
31 * Flip the flag so the sqspell_writeWords function knows to encrypt
32 * the message before writing it to the disk.
36 * Call the function that does the actual encryption_decryption.
38 sqspell_writeWords($words);
40 . _("Your personal dictionary has been <strong>encrypted</strong> and is now stored in an <strong>encrypted format</strong>.")
45 * Let's decrypt the file and save it as plain text.
47 $words=sqspell_getWords();
49 * Flip the flag and tell the sqspell_writeWords() function that we
50 * want to save it plaintext.
52 $SQSPELL_CRYPTO=false;
53 sqspell_writeWords($words);
55 . _("Your personal dictionary has been <strong>decrypted</strong> and is now stored as <strong>clear text</strong>.")
61 * Wait, this shouldn't happen! :)
63 $msg = "<p>No action requested.</p>";
66 sqspell_makePage( _("Personal Dictionary Crypto Settings"), null, $msg);