Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
650 B

  1. /*
  2. * Public domain
  3. * sha2.h compatibility shim
  4. */
  5. #ifdef HAVE_SHA2_H
  6. #include_next <sha2.h>
  7. #else
  8. #include "sha2_openbsd.h"
  9. #define __weak_alias(alias,sym)
  10. #define SHA224Transform(a, b) SHA256Transform(a, b)
  11. #define SHA224Update(a, b, c) SHA256Update(a, b, c)
  12. #define SHA224Pad(a) SHA256Pad(a)
  13. #define SHA384Transform(a, b) SHA512Transform(a, b)
  14. #define SHA384Update(a, b, c) SHA512Update(a, b, c)
  15. #define SHA384Pad(a) SHA512Pad(a)
  16. #define SHA512_CTX SHA2_CTX
  17. #define SHA512_Init(ctx) SHA512Init(ctx)
  18. #define SHA512_Update(ctx, buf, len) SHA512Update(ctx, (void *)buf, len)
  19. #define SHA512_Final(digest, ctx) SHA512Final(digest, ctx)
  20. #endif