sha512.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /* GNU Guix --- Functional package management for GNU
  2. Copyright (C) 2012, 2015 Ludovic Courtès <ludo@gnu.org>
  3. This file is part of GNU Guix.
  4. GNU Guix is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or (at
  7. your option) any later version.
  8. GNU Guix 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. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. */
  14. #include <gcrypt-hash.hh>
  15. #define SHA512_CTX guix_hash_context
  16. static inline void
  17. SHA512_Init (struct SHA512_CTX *ctx)
  18. {
  19. guix_hash_init (ctx, GCRY_MD_SHA512);
  20. }
  21. #define SHA512_Update guix_hash_update
  22. static inline void
  23. SHA512_Final (void *resbuf, struct SHA512_CTX *ctx)
  24. {
  25. guix_hash_final (resbuf, ctx, GCRY_MD_SHA512);
  26. }