libsha1.h 537 B

123456789101112131415161718192021
  1. /* ================ sha1.h ================ */
  2. /*
  3. SHA-1 in C
  4. By Steve Reid <steve@edmweb.com>
  5. 100% Public Domain
  6. */
  7. #if !defined(ESP8266) && !defined(ESP32)
  8. typedef struct {
  9. uint32_t state[5];
  10. uint32_t count[2];
  11. unsigned char buffer[64];
  12. } SHA1_CTX;
  13. void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
  14. void SHA1Init(SHA1_CTX* context);
  15. void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len);
  16. void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
  17. #endif