00001
00014 #ifndef SHA512_H
00015 #define SHA512_H
00016
00017 #include "hashcom.h"
00018
00019 #ifndef SHA512_SMALL
00020 #define SHA512_SMALL 0
00021 #endif
00022
00023 #define SHA512_DIGEST_SIZE (8*sizeof(uns64))
00024
00025 typedef struct {
00026 uns64 state[8];
00027 uns8 buf[128];
00028 uns32 count[4];
00029 } sha512_context;
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00035 #ifdef WIN32
00036 #ifdef CRYPTO_EXPORTS
00037 #define extern extern __declspec(dllexport)
00038 #else
00039 #define extern extern __declspec(dllimport)
00040 #endif
00041 #endif
00042
00043 extern void sha512_init(sha512_context *c);
00044 extern void sha512_update(sha512_context *c, uns8 *input, unsigned int inLen);
00045 extern void sha512_final(uns8 *digest, sha512_context *c);
00046
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050
00051 #ifdef WIN32
00052 #undef extern
00053 #endif
00054
00055
00056
00057
00058
00059 #endif