Artifact dbd462762b577bd0c113a71c20e70b085e7e0e9e:
- File sha1.h — part of check-in [9663631eed] at 2006-01-23 09:57:57 on branch trunk — Fixed authentication bug, where upon sucessful authentication the client was still rejected. Lots of work on backuppcd-client: It now stores the incoming data in an appropriate formatted directory structure; It can now check to see if a file exists before fetching it Created a backuppc-passwd program to accept a plaintext password as an argument and produce the SHA1 hash on stdout. Moved the "sha1sum" function to sha1.c and renamed it "SHA1sum" Minor fixes to link.h, win32.h Minor changes to file_sync.c: changed upper limit of internal write buffer to (INT_MAX-1); a bit of work on the weird collection of functions to write data to the network Added extra debug information to libbackuppcd.c (CHECKPOINT's everywhere.) Only attempt to set file permissions if the "preserve" flag is set in bpc_copyfile() Forced "RDIFF" check to fail in bpc_copyfile, so full copies will be made instead of attempting and failing diffs (RDIFF not implemented yet.) Fixed typo in documentation Moved backuppcd.pdf into doc/ upon tarball building. Added "attrib" file format description (user: rkeene size: 445)
#ifndef _BPC_SHA1_H #define _BPC_SHA1_H typedef struct { unsigned long state[5]; unsigned long count[2]; unsigned char buffer[64]; } SHA1_CTX; void SHA1Transform(unsigned long state[5], unsigned char buffer[64]); void SHA1Init(SHA1_CTX* context); void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len); void SHA1Final(unsigned char digest[20], SHA1_CTX* context); /* RSK */ char *SHA1sum(char *string); #endif