src/core/ngx_sha1.h - nginx source code

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_SHA1_H_INCLUDED_
  6. #define _NGX_SHA1_H_INCLUDED_


  7. #include <ngx_config.h>
  8. #include <ngx_core.h>


  9. typedef struct {
  10.     uint64_t  bytes;
  11.     uint32_t  a, b, c, d, e, f;
  12.     u_char    buffer[64];
  13. } ngx_sha1_t;


  14. void ngx_sha1_init(ngx_sha1_t *ctx);
  15. void ngx_sha1_update(ngx_sha1_t *ctx, const void *data, size_t size);
  16. void ngx_sha1_final(u_char result[20], ngx_sha1_t *ctx);


  17. #endif /* _NGX_SHA1_H_INCLUDED_ */