6 This module handles the encryption/decryption of the user dictionary
7 if the user so chooses from the options page.
9 // Declaring globals for E_ALL
10 global $action, $SQSPELL_CRYPTO;
13 // Let's encrypt the file.
14 $words=sqspell_getWords();
17 sqspell_writeWords($words);
18 $msg="<p>Your personal dictionary has been <strong>encrypted</strong> and is now stored in an <strong>encrypted format</strong>.</p>";
22 // Decrypt the file and save plain text.
23 $words=sqspell_getWords();
25 $SQSPELL_CRYPTO=false;
26 sqspell_writeWords($words);
27 $msg="<p>Your personal dictionary has been <strong>decrypted</strong> and is now stored as <strong>clear text</strong>.</p>";
31 // Wait, this shouldn't happen! :)
32 $msg = "<p>No action requested.</p>";
35 sqspell_makePage("Personal Dictionary Crypto Settings", null, $msg);