sha256_i.h 584 B

12345678910111213141516171819202122232425
  1. /*
  2. * SHA-256 internal definitions
  3. * Copyright (c) 2003-2011, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #ifndef SHA256_I_H
  9. #define SHA256_I_H
  10. #define SHA256_BLOCK_SIZE 64
  11. struct sha256_state {
  12. u64 length;
  13. u32 state[8], curlen;
  14. u8 buf[SHA256_BLOCK_SIZE];
  15. };
  16. void sha256_init(struct sha256_state *md);
  17. int sha256_process(struct sha256_state *md, const unsigned char *in,
  18. unsigned long inlen);
  19. int sha256_done(struct sha256_state *md, unsigned char *out);
  20. #endif /* SHA256_I_H */