hw_sha.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Header file for SHA hardware acceleration
  3. *
  4. * Copyright (c) 2012 Samsung Electronics
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef __HW_SHA_H
  9. #define __HW_SHA_H
  10. /**
  11. * Computes hash value of input pbuf using h/w acceleration
  12. *
  13. * @param in_addr A pointer to the input buffer
  14. * @param bufleni Byte length of input buffer
  15. * @param out_addr A pointer to the output buffer. When complete
  16. * 32 bytes are copied to pout[0]...pout[31]. Thus, a user
  17. * should allocate at least 32 bytes at pOut in advance.
  18. * @param chunk_size chunk size for sha256
  19. */
  20. void hw_sha256(const uchar * in_addr, uint buflen,
  21. uchar * out_addr, uint chunk_size);
  22. /**
  23. * Computes hash value of input pbuf using h/w acceleration
  24. *
  25. * @param in_addr A pointer to the input buffer
  26. * @param bufleni Byte length of input buffer
  27. * @param out_addr A pointer to the output buffer. When complete
  28. * 32 bytes are copied to pout[0]...pout[31]. Thus, a user
  29. * should allocate at least 32 bytes at pOut in advance.
  30. * @param chunk_size chunk_size for sha1
  31. */
  32. void hw_sha1(const uchar * in_addr, uint buflen,
  33. uchar * out_addr, uint chunk_size);
  34. #endif