BeeCrypt 4.2.1

include/beecrypt/ripemd256.h

Go to the documentation of this file.
00001 /*
00002  * This library is free software; you can redistribute it and/or
00003  * modify it under the terms of the GNU Lesser General Public
00004  * License as published by the Free Software Foundation; either
00005  * version 2.1 of the License, or (at your option) any later version.
00006  *
00007  * This library is distributed in the hope that it will be useful,
00008  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00010  * Lesser General Public License for more details.
00011  *
00012  * You should have received a copy of the GNU Lesser General Public
00013  * License along with this library; if not, write to the Free Software
00014  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00015  *
00016  */
00017 
00025 #ifndef _RIPEMD256_H
00026 #define _RIPEMD256_H
00027 
00028 #include "beecrypt/beecrypt.h"
00029 
00033 #ifdef __cplusplus
00034 struct BEECRYPTAPI ripemd256Param
00035 #else
00036 struct _ripemd256Param
00037 #endif
00038 {
00041     uint32_t h[8];
00044     uint32_t data[16];
00049     #if (MP_WBITS == 64)
00050     mpw length[1];
00051     #elif (MP_WBITS == 32)
00052     mpw length[2];
00053     #else
00054     # error
00055     #endif
00056 
00060     uint32_t offset;
00061 };
00062 
00063 #ifndef __cplusplus
00064 typedef struct _ripemd256Param ripemd256Param;
00065 #endif
00066 
00067 #ifdef __cplusplus
00068 extern "C" {
00069 #endif
00070 
00074 extern BEECRYPTAPI const hashFunction ripemd256;
00075 
00081 BEECRYPTAPI
00082 void ripemd256Process(ripemd256Param* mp);
00083 
00090 BEECRYPTAPI
00091 int  ripemd256Reset  (ripemd256Param* mp);
00092 
00101 BEECRYPTAPI
00102 int  ripemd256Update (ripemd256Param* mp, const byte* data, size_t size);
00103 
00111 BEECRYPTAPI
00112 int  ripemd256Digest (ripemd256Param* mp, byte* digest);
00113 
00114 #ifdef __cplusplus
00115 }
00116 #endif
00117 
00118 #endif