00001
00056 #ifndef SPH_RIPEMD_H__
00057 #define SPH_RIPEMD_H__
00058
00059 #include <stddef.h>
00060 #include "sph_types.h"
00061
00065 #define SPH_SIZE_ripemd 128
00066
00070 #define SPH_SIZE_ripemd128 128
00071
00075 #define SPH_SIZE_ripemd160 160
00076
00087 typedef struct {
00088 #ifndef DOXYGEN_IGNORE
00089 unsigned char buf[64];
00090 sph_u32 val[4];
00091 #if SPH_64
00092 sph_u64 count;
00093 #else
00094 sph_u32 count_high, count_low;
00095 #endif
00096 #endif
00097 } sph_ripemd_context;
00098
00105 void sph_ripemd_init(void *cc);
00106
00115 void sph_ripemd(void *cc, const void *data, size_t len);
00116
00126 void sph_ripemd_close(void *cc, void *dst);
00127
00139 void sph_ripemd_comp(const sph_u32 msg[16], sph_u32 val[4]);
00140
00141
00142
00153 typedef struct {
00154 #ifndef DOXYGEN_IGNORE
00155 unsigned char buf[64];
00156 sph_u32 val[4];
00157 #if SPH_64
00158 sph_u64 count;
00159 #else
00160 sph_u32 count_high, count_low;
00161 #endif
00162 #endif
00163 } sph_ripemd128_context;
00164
00171 void sph_ripemd128_init(void *cc);
00172
00181 void sph_ripemd128(void *cc, const void *data, size_t len);
00182
00192 void sph_ripemd128_close(void *cc, void *dst);
00193
00205 void sph_ripemd128_comp(const sph_u32 msg[16], sph_u32 val[4]);
00206
00207
00208
00219 typedef struct {
00220 #ifndef DOXYGEN_IGNORE
00221 unsigned char buf[64];
00222 sph_u32 val[5];
00223 #if SPH_64
00224 sph_u64 count;
00225 #else
00226 sph_u32 count_high, count_low;
00227 #endif
00228 #endif
00229 } sph_ripemd160_context;
00230
00237 void sph_ripemd160_init(void *cc);
00238
00247 void sph_ripemd160(void *cc, const void *data, size_t len);
00248
00258 void sph_ripemd160_close(void *cc, void *dst);
00259
00271 void sph_ripemd160_comp(const sph_u32 msg[16], sph_u32 val[5]);
00272
00273 #endif