Main Page | Class List | Directories | File List | Class Members | File Members

algorithms.h

Go to the documentation of this file.
00001 /*-*-c++-*-*****************************************************************
00002                              -------------------
00003     cvs         : $Id: algorithms.h,v 1.8 2005/11/16 12:19:16 cstim Exp $
00004     begin       : Sat Aug 10 2002
00005     copyright   : (C) 2002, 2003 by Fabian Kaiser and Christian Stimming
00006     email       : fabian@openhbci.de
00007 
00008  ***************************************************************************
00009  *                                                                         *
00010  *   This library is free software; you can redistribute it and/or         *
00011  *   modify it under the terms of the GNU Lesser General Public            *
00012  *   License as published by the Free Software Foundation; either          *
00013  *   version 2.1 of the License, or (at your option) any later version.    *
00014  *                                                                         *
00015  *   This library is distributed in the hope that it will be useful,       *
00016  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00018  *   Lesser General Public License for more details.                       *
00019  *                                                                         *
00020  *   You should have received a copy of the GNU Lesser General Public      *
00021  *   License along with this library; if not, write to the Free Software   *
00022  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00023  *   MA  02111-1307  USA                                                   *
00024  *                                                                         *
00025  ***************************************************************************/
00026 
00027 #include "ktoblzcheck.h"
00028 
00035 #ifdef HAVE_LONG_LONG
00036 # define long_long long long
00037 #else
00038 # define long_long long
00039 #endif // HAVE_LONG_LONG
00040 
00041 // forward declarations
00042 void   multArray(const int *a, const int *b, int dest[10]);
00048 void   crossFoot(const int *source, int dest[10], int start, int stop);
00050 void   crossFoot(int *source);
00055 int    add(const int *source, int start, int stop);
00057 inline int add_10(const int *source);
00058 std::string array2Number(int a[10]);
00059 void   number2Array(const std::string& number, int a[10]);
00060 long_long number2LongLong(const std::string& number);
00061 
00062 int    algo02(int modulus, int weight[10], bool crossfoot, int accountId[10]);
00063 int    algo03(int modulus, int weight[10], bool crossfoot, int accountId[10], 
00064                           int startAdd, int stopAdd);
00065 int    algo03a(int weight[10], bool crossfoot, int accountId[10], 
00066                           int startAdd, int stopAdd);
00067 int    algo05(int modulus1, int modulus2, int weight[10], int accountId[10],
00068                           int startAdd, int stopAdd);
00069 AccountNumberCheck::Result 
00070 algo04(const std::string& bankId, std::string accountId);
00071 AccountNumberCheck::Result 
00072 algo04a(const std::string& bankId, std::string accountId);
00073 AccountNumberCheck::Result
00074 algo06(const std::string& accountId);
00075 AccountNumberCheck::Result
00076 algo07(int accountId[10], int transform[6][10]);
00077 AccountNumberCheck::Result 
00078 algo01(int modulus, int weight[10], bool crossfoot, 
00079        int checkIndex, int accountId[10]);
00080 
00081 std::string accnum_getRegKey(const char *value_name);
00082 
00083 inline int add_10(const int *sp) {
00084     return sp[0] + sp[1] + sp[2] + sp[3] + sp[4] 
00085         + sp[5] + sp[6] + sp[7] + sp[8] + sp[9];
00086 }

Generated on Thu Nov 23 13:33:27 2006 for ktoblzcheck by  doxygen 1.4.1