chromium/third_party/unrar/src/sha1.cpp

#include "rar.hpp"

/*
SHA-1 in C
By Steve Reid <[email protected]>
100% Public Domain
*/

#ifndef SFX_MODULE
#define SHA1_UNROLL
#endif

/* blk0() and blk() perform the initial expand. */
/* I got the idea of expanding during the round function from SSLeay */
#ifdef LITTLE_ENDIAN
#define blk0(i)
#else
#define blk0
#endif
#define blk(i)

/* (R0+R1), R2, R3, R4 are the different operations used in SHA1 */
#define R0(v,w,x,y,z,i)
#define R1(v,w,x,y,z,i)
#define R2(v,w,x,y,z,i)
#define R3(v,w,x,y,z,i)
#define R4(v,w,x,y,z,i)

/* Hash a single 512-bit block. This is the core of the algorithm. */
void SHA1Transform(uint32 state[5], uint32 workspace[16], const byte buffer[64], bool inplace)
{}


/* Initialize new context */
void sha1_init(sha1_context* context)
{}


/* Run your data through this. */
void sha1_process( sha1_context * context, const unsigned char * data, size_t len)
{}


void sha1_process_rar29(sha1_context *context, const unsigned char *data, size_t len)
{}


/* Add padding and return the message digest. */
void sha1_done( sha1_context* context, uint32 digest[5])
{}