Verify bittorrent .torrent metainfo files.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

45 lignes
631B

  1. #ifndef SHA1_H
  2. #define SHA1_H
  3. /*
  4. SHA-1 in C
  5. By Steve Reid <steve@edmweb.com>
  6. 100% Public Domain
  7. */
  8. #include "stdint.h"
  9. typedef struct
  10. {
  11. uint32_t state[5];
  12. uint32_t count[2];
  13. unsigned char buffer[64];
  14. } SHA1_CTX;
  15. void SHA1Transform(
  16. uint32_t state[5],
  17. const unsigned char buffer[64]
  18. );
  19. void SHA1Init(
  20. SHA1_CTX * context
  21. );
  22. void SHA1Update(
  23. SHA1_CTX * context,
  24. const unsigned char *data,
  25. uint32_t len
  26. );
  27. void SHA1Final(
  28. unsigned char digest[20],
  29. SHA1_CTX * context
  30. );
  31. void SHA1(
  32. char *hash_out,
  33. const char *str,
  34. int len);
  35. #endif /* SHA1_H */