Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

pin.h

Go to the documentation of this file.
00001 
00006 /*
00007                =.            This file is part of the Opie Project
00008              .=l.            Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org>
00009            .>+-=
00010  _;:,     .>    :=|.         This library is free software; you can 
00011 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00012 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00013 .="- .-=="i,     .._         License as published by the Free Software
00014  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00015      ._= =}       :          or (at your option) any later version.
00016     .%`+i>       _;_.        
00017     .i_,=:_.      -<s.       This library is distributed in the hope that  
00018      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00019     : ..    .:,     . . .    without even the implied warranty of
00020     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00021   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00022 ..}^=.=       =       ;      Library General Public License for more
00023 ++=   -.     .`     .:       details.
00024  :     =  ...= . :.=-        
00025  -.   .:....=;==+<;          You should have received a copy of the GNU
00026   -_. . .   )=.  =           Library General Public License along with
00027     --        :-=`           this library; see the file COPYING.LIB. 
00028                              If not, write to the Free Software Foundation,
00029                              Inc., 59 Temple Place - Suite 330,
00030                              Boston, MA 02111-1307, USA.
00031 
00032 */
00033 
00034 #ifndef PIN_H
00035 #define PIN_H
00036 
00037 #include <qobject.h>
00038 #include <qstring.h>
00039 #include <opie2/multiauthplugininterface.h>
00040 #include "pinConfigWidget.h"
00041 
00043 
00046 class PinPlugin : public QObject, public Opie::Security::MultiauthPluginObject {
00047 
00048     Q_OBJECT
00049     
00050 public:
00051     PinPlugin();
00052     virtual ~PinPlugin();
00053     int authenticate();
00054     Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent);
00055     QString pixmapNameConfig() const;
00056     QString pixmapNameWidget() const;
00057     QString pluginName() const;
00058     
00059 private slots:
00060     QString getPIN( const QString& prompt );
00061     QString getCryptedPIN( const QString& prompt );
00062     void changePIN();
00063     void clearPIN();
00064     
00065 private:
00066     PinConfigWidget * m_pinW;
00067     QString encrypt(const QString& pin);
00068     bool verify(const QString& pin, const QString& hash);
00069 };
00070 
00071 #endif // PIN_H

Generated on Sat Nov 5 16:17:46 2005 for OPIE by  doxygen 1.4.2