12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #include "types.h"
- #define SHA_BLOCKSIZE 64
- #define SHA_DIGESTSIZE 20
- struct SHAContext {
- word32 data[ 16 ];
- word32 digest[ 5 ];
- #ifdef HAVE64
- word64 count;
- #else
- word32 countHi, countLo;
- #endif
- };
- #define SHA_VERSION 1
- #if !defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
- #define BIG_ENDIAN 1
- #endif
- void shaInit(struct SHAContext *sha);
- void shaTransform(struct SHAContext *sha);
- void shaUpdate(struct SHAContext *sha, word8 const *buffer, unsigned count);
- void shaFinal(struct SHAContext *shaInfo, word8 *hash);
|