SourceForge Logo
Main Page   Compound List   File List   Compound Members   File Members  

GPasmanRC2CodecPrototype.h

Go to the documentation of this file.
00001 /*!
00002  * \file GPasmanRC2CodecPrototype.h
00003  * \brief Defines the password encoding/decoding prototype for Gpasman RC2 
00004  *              encrypted file created by Olivier Sessink <gpasman@nl.linux.org>
00005  *
00006  * \author Frederic RUAUDEL <grumz@users.sf.net>
00007  *
00008  * $Revision: 1.8 $
00009  * $Date: 2003/03/08 10:41:16 $
00010  *
00011  * \b GPasmanRC2Plugin
00012  * Copyleft (c) 2002 Frederic RUAUDEL, all rights reversed
00013  *
00014  * This program is free software which I release under the GNU General Public
00015  * License. You may redistribute and/or modify this program under the terms
00016  * of that license as published by the Free Software Foundation; either
00017  * version 2 of the License, or (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.  Version 2 is in the
00023  * COPYING file in the top level directory of this distribution.
00024  *
00025  * To get a copy of the GNU General Public License, write to the Free Software
00026  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  **/
00028 
00029 #ifndef GPASMAN_RC2_CODEC_PROTOTYPE_H
00030 #define GPASMAN_RC2_CODEC_PROTOTYPE_H
00031 
00032 #include <stdio.h>
00033 #include <pwd.h>
00034 #include <sys/types.h>
00035 #include <unistd.h>
00036 #include <errno.h>
00037 
00038 #include <list>
00039 #include <string>
00040 #include <vector>
00041 
00042 #include <Passguard.h>
00043 
00044 #include <RC2.h>
00045 
00046 using namespace std;
00047 
00048 /*!
00049  * \brief Password encoding/decoding prototype for Gpasman RC2 
00050  *              encrypted file
00051  **/
00052 class GPasmanRC2CodecPrototype : public PasswordCodecPrototype
00053 {
00054         public:
00055                 GPasmanRC2CodecPrototype ();
00056                 GPasmanRC2CodecPrototype (const GPasmanRC2CodecPrototype& password_codec_prototype);
00057                 virtual ~GPasmanRC2CodecPrototype ();
00058 
00059                 virtual PasswordCodecPrototype* clone (void) const;
00060 
00061                 virtual bool loadFile (string filename, string password);
00062                 virtual bool saveFile (string password);
00063 
00064                 virtual bool pushPasswordInfos (PasswordInfos* password_infos);
00065 
00066                 virtual bool hasFixedField (void) const;
00067                 virtual int getNbField (void) const;
00068                 virtual PasswordInfos getFieldsName (void) const;
00069                 virtual bool setFieldsName (PasswordInfos fields_name_infos);
00070 
00071         private:
00072                 string _filename;
00073                 PasswordInfos _fields_name;
00074                 list<PasswordInfos*> _password_infos_list;
00075 };
00076 
00077 #endif /* GPASMAN_RC2_CODEC_PROTOTYPE_H */

Generated on Sun Mar 9 11:13:54 2003 for GPasmanRC2Plugin by doxygen1.2.15