ctf-sha1.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SHA-1 thunks.
  2. Copyright (C) 2019-2022 Free Software Foundation, Inc.
  3. This file is part of libctf.
  4. libctf is free software; you can redistribute it and/or modify it under
  5. the terms of the GNU General Public License as published by the Free
  6. Software Foundation; either version 3, or (at your option) any later
  7. version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. See the GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; see the file COPYING. If not see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _CTF_SHA1_H
  16. #define _CTF_SHA1_H
  17. #include "config.h"
  18. #include "sha1.h"
  19. #define CTF_SHA1_SIZE 41
  20. typedef struct sha1_ctx ctf_sha1_t;
  21. static inline void
  22. ctf_sha1_init (ctf_sha1_t *sha1)
  23. {
  24. sha1_init_ctx (sha1);
  25. }
  26. static inline void
  27. ctf_sha1_add (ctf_sha1_t *sha1, const void *buf, size_t len)
  28. {
  29. sha1_process_bytes (buf, len, sha1);
  30. }
  31. #endif