/*
Sysepub 0.9.0 - A Symmetric Semi-Public key cipher
Copyright (C) 2002 Pierre Blanc
Pierre Blanc: blanc_teutoburgo@yahoo.it
http://teutoburgo.cjb.net
http://it.geocities.com/teutoburgo
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
or go to http://www.gnu.org/copyleft/gpl.html
*/
/**
* Sysepub 0.9 - Class PrintMessages (used to print the help, warranty, etc. messages)
* Creation date: (30/08/2002 16.50.29)
* @author: Pierre Blanc
*/
public class PrintMessages
{
boolean isGUI=false;
public PrintMessages(){
}
public PrintMessages(boolean isGUI){
this.isGUI=isGUI;
}
public void sPrintLog
(String s
){
if (isGUI) stringLog=stringLog+s+"\n";
}
/**
* Returns to the GUI application the String of the log messages.
*/
stringLog="";
return output;
}
public void printCopyright(){
sPrintLog("Sysepub 0.9.0 Copyright (C) Pierre Blanc 2002"+
" http://teutoburgo.cjb.net");
sPrintLog("This software is under"+
" the GNU GPL license v.2");
}
public void printNoWarranty(){
sPrintLog("\n BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n"+
"FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n"+
"OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n"+
"PROVIDE THE PROGRAM 'AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\n"+
"OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n"+
"MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\n"+
"TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\n"+
"PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\n"+
"REPAIR OR CORRECTION.\n\n"+
" IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"+
"WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n"+
"REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\n"+
"INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\n"+
"OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\n"+
"TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\n"+
"YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\n"+
"PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\n"+
"POSSIBILITY OF SUCH DAMAGES.");
}
public void printHelpGUI(){
sPrintLog("Use the Encipher/Decipher buttons to operate on the selected file");
sPrintLog("Use relative names if your files are in the Sysepub/plaintexts or ciphertexts directories");
sPrintLog("Either you can choose every file from the File->Open menu");
sPrintLog("You can use multiple configuration files:");
sPrintLog("to select another, type its name (it has to be in the Sysepub/config direcory)");
sPrintLog("and press 'Change'");
sPrintLog("If your public key isn't large enough, simply press 'Generate'");
sPrintLog("You can change its size either from the textfield or from the config file.");
sPrintLog("For more detailed help refer to the Sysepub manual in the Sysepub/doc directory.");
}
public void printLicenseGUI(){
sPrintLog("Sysepub comes with ABSOLUTELY NO WARRANTY; for details: Help->Warranty");
sPrintLog("This is free software, and you are welcome to redistribute it"+
" under certain\nconditions; for details see the gpl.txt file in the Sysepub/doc directory.");
}
public void printHelp() {
sPrintLog("Sysepub comes with ABSOLUTELY NO WARRANTY; for details: java Sysepub w");
sPrintLog("This is free software, and you are welcome to redistribute it"+
" under certain\nconditions; for details see the gpl.txt file.");
sPrintLog("Usage:\n");
sPrintLog("java Sysepub option [parameter]");
sPrintLog("");
sPrintLog("Options:");
sPrintLog("e : performs encryption (parameter: the filename to write)");
sPrintLog("d : performs decryption (parameter: the filename to write)");
sPrintLog("g : generates a random file as public key (parameter: the file length in KB)");
sPrintLog("If no filename is specified the default file is used.");
sPrintLog("If you type only the filename Sysepub will search the file in plain/ciphertexts");
sPrintLog("");
sPrintLog("Examples: java Sysepub e supersecret.txt");
sPrintLog("Encrypts the file specified and writes it in the ciphertexts directory");
sPrintLog(" java Sysepub d supersecret.txt");
sPrintLog("Decrypts the file specified and writes it in the plaintexts directory");
sPrintLog("\nSee the readme.txt , doc/manual.html , doc/help.html "+
", doc/gpl.txt for more\ninformations.");
// sPrintLog("There is a configuration file: config/ssp.cfg");
}
}