xref: /unit/src/nxt_sha1.h (revision 1131)
1*1131Smax.romanov@nginx.com 
2*1131Smax.romanov@nginx.com /*
3*1131Smax.romanov@nginx.com  * Copyright (C) Igor Sysoev
4*1131Smax.romanov@nginx.com  * Copyright (C) NGINX, Inc.
5*1131Smax.romanov@nginx.com  */
6*1131Smax.romanov@nginx.com 
7*1131Smax.romanov@nginx.com 
8*1131Smax.romanov@nginx.com #ifndef _NXT_SHA1_H_INCLUDED_
9*1131Smax.romanov@nginx.com #define _NXT_SHA1_H_INCLUDED_
10*1131Smax.romanov@nginx.com 
11*1131Smax.romanov@nginx.com 
12*1131Smax.romanov@nginx.com typedef struct {
13*1131Smax.romanov@nginx.com     uint64_t  bytes;
14*1131Smax.romanov@nginx.com     uint32_t  a, b, c, d, e;
15*1131Smax.romanov@nginx.com     u_char    buffer[64];
16*1131Smax.romanov@nginx.com } nxt_sha1_t;
17*1131Smax.romanov@nginx.com 
18*1131Smax.romanov@nginx.com 
19*1131Smax.romanov@nginx.com NXT_EXPORT void nxt_sha1_init(nxt_sha1_t *ctx);
20*1131Smax.romanov@nginx.com NXT_EXPORT void nxt_sha1_update(nxt_sha1_t *ctx, const void *data, size_t size);
21*1131Smax.romanov@nginx.com NXT_EXPORT void nxt_sha1_final(u_char result[20], nxt_sha1_t *ctx);
22*1131Smax.romanov@nginx.com 
23*1131Smax.romanov@nginx.com 
24*1131Smax.romanov@nginx.com #endif /* _NXT_SHA1_H_INCLUDED_ */
25