gwenhywfar  4.17.0
padd.h
Go to the documentation of this file.
1 /***************************************************************************
2  $RCSfile$
3  -------------------
4  cvs : $Id$
5  begin : Mon Jan 05 2004
6  copyright : (C) 2004 by Martin Preuss
7  email : martin@libchipcard.de
8 
9  ***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2.1 of the License, or (at your option) any later version. *
15  * *
16  * This library is distributed in the hope that it will be useful, *
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
19  * Lesser General Public License for more details. *
20  * *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library; if not, write to the Free Software *
23  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24  * MA 02111-1307 USA *
25  * *
26  ***************************************************************************/
27 
28 #ifndef GWEN_PADD_H
29 #define GWEN_PADD_H
30 
31 #include <gwenhywfar/buffer.h>
32 #include <gwenhywfar/paddalgo.h>
33 #include <gwenhywfar/mdigest.h>
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 
50 
59 
64 int GWEN_Padd_PaddWithIso9796_2(GWEN_BUFFER *buf, int dstSize);
65 
66 
69 
76 
83 
84 
99 
106 
107 
109 int GWEN_Padd_PaddWithPkcs1Bt1(GWEN_BUFFER *src, int dstSize);
110 
113 
115 int GWEN_Padd_PaddWithPkcs1Bt2(GWEN_BUFFER *src, int dstSize);
116 
119 
120 
122 int GWEN_Padd_MGF1(uint8_t *pDestBuffer,
123  uint32_t lDestBuffer,
124  const uint8_t *pSeed,
125  uint32_t lSeed,
126  GWEN_MDIGEST *md);
127 
132 int GWEN_Padd_AddPkcs1Pss(uint8_t *pDestBuffer,
133  uint32_t lDestBuffer,
134  uint32_t nbits,
135  const uint8_t *pHash,
136  uint32_t lHash,
137  uint32_t lSalt,
138  GWEN_MDIGEST *md);
139 
141 int GWEN_Padd_VerifyPkcs1Pss(const uint8_t *pSrcBuffer,
142  uint32_t lSrcBuffer,
143  uint32_t nbits,
144  const uint8_t *pHash,
145  uint32_t lHash,
146  uint32_t lSalt,
147  GWEN_MDIGEST *md);
148 
149 
152 
155 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 
163 
164 #endif /* GWEN_PADD_H */
165 
GWENHYWFAR_API int GWEN_Padd_PaddWithAnsiX9_23ToMultipleOf(GWEN_BUFFER *src, int y)
GWENHYWFAR_API int GWEN_Padd_UnpaddWithPkcs1Bt2(GWEN_BUFFER *src)
GWENHYWFAR_API int GWEN_Padd_MGF1(uint8_t *pDestBuffer, uint32_t lDestBuffer, const uint8_t *pSeed, uint32_t lSeed, GWEN_MDIGEST *md)
GWENHYWFAR_API int GWEN_Padd_PaddWithISO9796(GWEN_BUFFER *src)
struct GWEN_CRYPT_PADDALGO GWEN_CRYPT_PADDALGO
Definition: paddalgo.h:21
GWENHYWFAR_API int GWEN_Padd_PaddWithPkcs1Bt1(GWEN_BUFFER *src, int dstSize)
GWENHYWFAR_API int GWEN_Padd_UnapplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *buf)
GWENHYWFAR_API int GWEN_Padd_PaddWithPkcs1Bt2(GWEN_BUFFER *src, int dstSize)
GWENHYWFAR_API int GWEN_Padd_UnpaddWithIso9796_2(GWEN_BUFFER *buf)
GWENHYWFAR_API int GWEN_Padd_PaddWithAnsiX9_23(GWEN_BUFFER *src)
GWENHYWFAR_API int GWEN_Padd_UnpaddWithAnsiX9_23FromMultipleOf(GWEN_BUFFER *src, int y)
GWENHYWFAR_API int GWEN_Padd_ApplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *src)
struct GWEN_MDIGEST GWEN_MDIGEST
Definition: mdigest.h:25
GWENHYWFAR_API int GWEN_Padd_PaddWithIso9796_2(GWEN_BUFFER *buf, int dstSize)
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition: buffer.h:41
#define GWENHYWFAR_API
Definition: gwenhywfarapi.h:67
GWENHYWFAR_API int GWEN_Padd_AddPkcs1Pss(uint8_t *pDestBuffer, uint32_t lDestBuffer, uint32_t nbits, const uint8_t *pHash, uint32_t lHash, uint32_t lSalt, GWEN_MDIGEST *md)
GWENHYWFAR_API int GWEN_Padd_UnpaddWithPkcs1Bt1(GWEN_BUFFER *src)
GWENHYWFAR_API int GWEN_Padd_VerifyPkcs1Pss(const uint8_t *pSrcBuffer, uint32_t lSrcBuffer, uint32_t nbits, const uint8_t *pHash, uint32_t lHash, uint32_t lSalt, GWEN_MDIGEST *md)
GWENHYWFAR_API int GWEN_Padd_UnpaddWithAnsiX9_23(GWEN_BUFFER *src)