File: sha1.h

package info (click to toggle)
tinymux 2.10.1.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,212 kB
  • ctags: 8,535
  • sloc: cpp: 111,587; sh: 5,867; ansic: 141; makefile: 139
file content (25 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*! \file sha1.h
 * \brief Header for SHA1 hash implementation.
 *
 * $Id: sha1.h 4021 2008-12-10 14:41:11Z brazilofmux $
 *
 */

#ifndef SHA1_H
#define SHA1_H

typedef struct
{
    UINT64   nTotal;
    UINT32   H[5];
    UINT8    block[64];
    size_t   nblock;
} SHA_CTX;

#define SHA_DIGEST_LENGTH 20

void SHA1_Init(SHA_CTX *p);
void SHA1_Update(SHA_CTX *p, __in_ecount(n) const UTF8 *buf, __in size_t n);
void SHA1_Final(__out UINT8 md[SHA_DIGEST_LENGTH], SHA_CTX *p);

#endif // SHA1_H