Main Page   Compound List   File List   Compound Members   File Members  

sha384.h

Go to the documentation of this file.
00001 
00014 #ifndef SHA384_H
00015 #define SHA384_H
00016 
00017 #include "hashcom.h"
00018 #include "sha512.h"
00019 
00020 #ifndef SHA384_SMALL
00021   #define SHA384_SMALL   0  /* low footprint sha-384 */
00022 #endif
00023 
00024 #define SHA384_DIGEST_SIZE   (6*sizeof(uns64))
00025 
00026 typedef struct {
00027   uns64 state[8];
00028   uns8 buf[128];
00029   uns32 count[4];
00030 } sha384_context;
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 #ifdef WIN32
00037  #ifdef CRYPTO_EXPORTS
00038    #define extern   extern __declspec(dllexport)
00039  #else
00040    #define extern   extern __declspec(dllimport)
00041  #endif
00042 #endif
00043 
00044 extern void sha384_init(sha384_context *c);
00045 extern void sha384_update(sha384_context *c, uns8 *input, unsigned int inLen);
00046 extern void sha384_final(uns8 *digest, sha384_context *c);
00047 
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051 
00052 #ifdef WIN32
00053   #undef extern
00054 #endif
00055 
00056 /*
00057 sha384(abc) = cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7
00058 */
00059 
00060 #endif
GPL