padd.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile$
00003  -------------------
00004  cvs         : $Id$
00005  begin       : Mon Jan 05 2004
00006  copyright   : (C) 2004 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 #ifndef GWEN_PADD_H
00029 #define GWEN_PADD_H
00030 
00031 #include <gwenhywfar/buffer.h>
00032 #include <gwenhywfar/paddalgo.h>
00033 #include <gwenhywfar/mdigest.h>
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 
00050 
00057 GWENHYWFAR_API
00058 int GWEN_Padd_PaddWithISO9796(GWEN_BUFFER *src);
00059 
00063 GWENHYWFAR_API
00064 int GWEN_Padd_PaddWithIso9796_2(GWEN_BUFFER *buf, int dstSize);
00065 
00066 
00067 GWENHYWFAR_API
00068 int GWEN_Padd_UnpaddWithIso9796_2(GWEN_BUFFER *buf);
00069 
00082 GWENHYWFAR_API
00083 int GWEN_Padd_PaddWithAnsiX9_23(GWEN_BUFFER *src);
00084 
00089 GWENHYWFAR_API
00090 int GWEN_Padd_UnpaddWithAnsiX9_23(GWEN_BUFFER *src);
00091 
00092 
00093 GWENHYWFAR_API
00094 int GWEN_Padd_PaddWithPkcs1Bt1(GWEN_BUFFER *src, int dstSize);
00095 
00096 GWENHYWFAR_API
00097 int GWEN_Padd_UnpaddWithPkcs1Bt1(GWEN_BUFFER *src);
00098 
00099 GWENHYWFAR_API
00100 int GWEN_Padd_PaddWithPkcs1Bt2(GWEN_BUFFER *src, int dstSize);
00101 
00102 GWENHYWFAR_API
00103 int GWEN_Padd_UnpaddWithPkcs1Bt2(GWEN_BUFFER *src);
00104 
00105 
00106 GWENHYWFAR_API
00107 int GWEN_Padd_MGF1(uint8_t *pDestBuffer,
00108                    uint32_t lDestBuffer,
00109                    const uint8_t *pSeed,
00110                    uint32_t lSeed,
00111                    GWEN_MDIGEST *md);
00112 
00116 GWENHYWFAR_API
00117 int GWEN_Padd_AddPkcs1Pss(uint8_t *pDestBuffer,
00118                           uint32_t lDestBuffer,
00119                           uint32_t nbits,
00120                           const uint8_t *pHash,
00121                           uint32_t lHash,
00122                           uint32_t lSalt,
00123                           GWEN_MDIGEST *md);
00124 
00125 GWENHYWFAR_API
00126 int GWEN_Padd_VerifyPkcs1Pss(const uint8_t *pSrcBuffer,
00127                              uint32_t lSrcBuffer,
00128                              uint32_t nbits,
00129                              const uint8_t *pHash,
00130                              uint32_t lHash,
00131                              uint32_t lSalt,
00132                              GWEN_MDIGEST *md);
00133 
00134 
00135 GWENHYWFAR_API
00136 int GWEN_Padd_ApplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *src);
00137 
00138 GWENHYWFAR_API
00139 int GWEN_Padd_UnapplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *buf);
00140 
00143 #ifdef __cplusplus
00144 }
00145 #endif
00146 
00147 
00148 
00149 #endif /* GWEN_PADD_H */
00150 

Generated on Thu Aug 20 13:54:39 2009 for gwenhywfar by  doxygen 1.5.9