File: sha1.h

package info (click to toggle)
android-platform-dalvik 10.0.0%2Br36-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 26,132 kB
  • sloc: java: 270,758; cpp: 8,766; sh: 2,004; javascript: 976; ansic: 534; awk: 368; makefile: 26
file content (20 lines) | stat: -rw-r--r-- 432 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * See "sha1.cpp" for author info.
 */
#ifndef LIBDEX_SHA1_H_
#define LIBDEX_SHA1_H_

struct SHA1_CTX {
    unsigned long state[5];
    unsigned long count[2];
    unsigned char buffer[64];
};

#define HASHSIZE 20

void SHA1Init(SHA1_CTX* context);
void SHA1Update(SHA1_CTX* context, const unsigned char* data,
    unsigned long len);
void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context);

#endif  // LIBDEX_SHA1_H_