ptorrent / sha1.h

#ifndef SHA1_H
#define SHA1_H

SHA-1 in C
By Steve Reid <>
100% Public Domain

23 Apr 2001 version from
Modified slightly to take advantage of autoconf.
See sha1.c for full history comments.

#ifdef __cplusplus
extern "C" {

#include <inttypes.h>

typedef struct {
    uint32_t state[5];
    uint32_t count[2];
    unsigned char buffer[64];

void SHA1_Transform(uint32_t state[5], unsigned char buffer[64]);
void SHA1_Init(SHA_CTX* context);
void SHA1_Update(SHA_CTX* context, unsigned char* data, uint32_t len); /* JHB */
void SHA1_Final(unsigned char digest[20], SHA_CTX* context);

#ifdef __cplusplus

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.