2
0

hashpriv.h 884 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * QEMU Crypto hash driver supports
  3. *
  4. * Copyright (c) 2017 HUAWEI TECHNOLOGIES CO., LTD.
  5. *
  6. * Authors:
  7. * Longpeng(Mike) <longpeng2@huawei.com>
  8. *
  9. * This work is licensed under the terms of the GNU GPL, version 2 or
  10. * (at your option) any later version. See the COPYING file in the
  11. * top-level directory.
  12. *
  13. */
  14. #ifndef QCRYPTO_HASHPRIV_H
  15. #define QCRYPTO_HASHPRIV_H
  16. typedef struct QCryptoHashDriver QCryptoHashDriver;
  17. struct QCryptoHashDriver {
  18. int (*hash_bytesv)(QCryptoHashAlgorithm alg,
  19. const struct iovec *iov,
  20. size_t niov,
  21. uint8_t **result,
  22. size_t *resultlen,
  23. Error **errp);
  24. };
  25. extern QCryptoHashDriver qcrypto_hash_lib_driver;
  26. #ifdef CONFIG_AF_ALG
  27. #include "afalgpriv.h"
  28. extern QCryptoHashDriver qcrypto_hash_afalg_driver;
  29. #endif
  30. #endif