padd.h
Go to the documentation of this file.
/***************************************************************************
$RCSfile$
-------------------
cvs : $Id$
begin : Mon Jan 05 2004
copyright : (C) 2004 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
* MA 02111-1307 USA *
* *
***************************************************************************/
#ifndef GWEN_PADD_H
#define GWEN_PADD_H
#include <gwenhywfar/buffer.h>
#include <gwenhywfar/paddalgo.h>
#include <gwenhywfar/mdigest.h>
#ifdef __cplusplus
extern "C" {
#endif
GWENHYWFAR_API
int GWEN_Padd_PaddWithISO9796(GWEN_BUFFER *src);
GWENHYWFAR_API
int GWEN_Padd_PaddWithIso9796_2(GWEN_BUFFER *buf, 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_23(GWEN_BUFFER *src);
GWENHYWFAR_API
int GWEN_Padd_PaddWithAnsiX9_23ToMultipleOf(GWEN_BUFFER *src, int y);
GWENHYWFAR_API
int GWEN_Padd_UnpaddWithAnsiX9_23FromMultipleOf(GWEN_BUFFER *src, int y);
GWENHYWFAR_API
int GWEN_Padd_PaddWithPkcs1Bt1(GWEN_BUFFER *src, int dstSize);
GWENHYWFAR_API
int GWEN_Padd_UnpaddWithPkcs1Bt1(GWEN_BUFFER *src);
GWENHYWFAR_API
int GWEN_Padd_PaddWithPkcs1Bt2(GWEN_BUFFER *src, int dstSize);
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_PaddWithZka(GWEN_BUFFER *src);
GWENHYWFAR_API
int GWEN_Padd_PaddWithZkaToMultipleOf(GWEN_BUFFER *src, int y);
GWENHYWFAR_API
int GWEN_Padd_UnpaddWithZkaFromMultipleOf(GWEN_BUFFER *buf, int y);
GWENHYWFAR_API
int GWEN_Padd_UnpaddWithZka(GWEN_BUFFER *buf);
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_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_ApplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *src);
GWENHYWFAR_API
int GWEN_Padd_UnapplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *buf);
#ifdef __cplusplus
}
#endif
#endif /* GWEN_PADD_H */
buffer.h
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
GWENHYWFAR_API
#define GWENHYWFAR_API
Definition gwenhywfarapi.h:67
mdigest.h
GWEN_MDIGEST
struct GWEN_MDIGEST GWEN_MDIGEST
Definition mdigest.h:25
GWEN_Padd_PaddWithZka
GWENHYWFAR_API int GWEN_Padd_PaddWithZka(GWEN_BUFFER *src)
GWEN_Padd_UnpaddWithZkaFromMultipleOf
GWENHYWFAR_API int GWEN_Padd_UnpaddWithZkaFromMultipleOf(GWEN_BUFFER *buf, int y)
GWEN_Padd_PaddWithZkaToMultipleOf
GWENHYWFAR_API int GWEN_Padd_PaddWithZkaToMultipleOf(GWEN_BUFFER *src, int y)
GWEN_Padd_UnpaddWithAnsiX9_23
GWENHYWFAR_API int GWEN_Padd_UnpaddWithAnsiX9_23(GWEN_BUFFER *src)
GWEN_Padd_UnpaddWithZka
GWENHYWFAR_API int GWEN_Padd_UnpaddWithZka(GWEN_BUFFER *buf)
GWEN_Padd_PaddWithIso9796_2
GWENHYWFAR_API int GWEN_Padd_PaddWithIso9796_2(GWEN_BUFFER *buf, int dstSize)
GWEN_Padd_UnpaddWithPkcs1Bt2
GWENHYWFAR_API int GWEN_Padd_UnpaddWithPkcs1Bt2(GWEN_BUFFER *src)
GWEN_Padd_AddPkcs1Pss
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)
GWEN_Padd_PaddWithPkcs1Bt2
GWENHYWFAR_API int GWEN_Padd_PaddWithPkcs1Bt2(GWEN_BUFFER *src, int dstSize)
GWEN_Padd_UnpaddWithIso9796_2
GWENHYWFAR_API int GWEN_Padd_UnpaddWithIso9796_2(GWEN_BUFFER *buf)
GWEN_Padd_PaddWithAnsiX9_23ToMultipleOf
GWENHYWFAR_API int GWEN_Padd_PaddWithAnsiX9_23ToMultipleOf(GWEN_BUFFER *src, int y)
GWEN_Padd_UnpaddWithAnsiX9_23FromMultipleOf
GWENHYWFAR_API int GWEN_Padd_UnpaddWithAnsiX9_23FromMultipleOf(GWEN_BUFFER *src, int y)
GWEN_Padd_ApplyPaddAlgo
GWENHYWFAR_API int GWEN_Padd_ApplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *src)
GWEN_Padd_PaddWithPkcs1Bt1
GWENHYWFAR_API int GWEN_Padd_PaddWithPkcs1Bt1(GWEN_BUFFER *src, int dstSize)
GWEN_Padd_VerifyPkcs1Pss
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)
GWEN_Padd_PaddWithAnsiX9_23
GWENHYWFAR_API int GWEN_Padd_PaddWithAnsiX9_23(GWEN_BUFFER *src)
GWEN_Padd_UnapplyPaddAlgo
GWENHYWFAR_API int GWEN_Padd_UnapplyPaddAlgo(const GWEN_CRYPT_PADDALGO *a, GWEN_BUFFER *buf)
GWEN_Padd_PaddWithISO9796
GWENHYWFAR_API int GWEN_Padd_PaddWithISO9796(GWEN_BUFFER *src)
GWEN_Padd_MGF1
GWENHYWFAR_API int GWEN_Padd_MGF1(uint8_t *pDestBuffer, uint32_t lDestBuffer, const uint8_t *pSeed, uint32_t lSeed, GWEN_MDIGEST *md)
GWEN_Padd_UnpaddWithPkcs1Bt1
GWENHYWFAR_API int GWEN_Padd_UnpaddWithPkcs1Bt1(GWEN_BUFFER *src)
paddalgo.h
GWEN_CRYPT_PADDALGO
struct GWEN_CRYPT_PADDALGO GWEN_CRYPT_PADDALGO
Definition paddalgo.h:21