10
10
* This module handles the encryption/decryption of the user dictionary
11
11
* if the user so chooses from the options page.
13
* $Id: crypto.mod,v 1.4 2002/12/31 12:49:40 kink Exp $
13
* $Id: crypto.mod,v 1.4.2.3 2004/09/06 08:35:05 tokul Exp $
15
* @author Konstantin Riabitsev <icon@duke.edu> ($Author: kink $)
16
* @version $Date: 2002/12/31 12:49:40 $
15
* @author Konstantin Riabitsev <icon@duke.edu> ($Author: tokul $)
16
* @version $Date: 2004/09/06 08:35:05 $
22
22
global $SQSPELL_CRYPTO;
24
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>";
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 encrypted and is now stored in an encrypted format.")
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 decrypted and is now stored as plain text.")
60
* Wait, this shouldn't happen! :)
62
$msg = '<p>No action requested.</p>';
66
65
sqspell_makePage( _("Personal Dictionary Crypto Settings"), null, $msg);