paddle_stream_decrypt.h 767 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <stdio.h>
  3. #ifndef PADDLE_MODEL_PROTECT_API_PADDLE_STREAM_DECRYPT_H
  4. #define PADDLE_MODEL_PROTECT_API_PADDLE_STREAM_DECRYPT_H
  5. #ifdef WIN32
  6. #ifdef PM_EXPORTS
  7. #define PDD_MODEL_API __declspec(dllexport)
  8. #else
  9. #define PDD_MODEL_API __declspec(dllimport)
  10. #endif
  11. #endif
  12. #ifdef linux
  13. #define PDD_MODEL_API __attribute__((visibility("default")))
  14. #endif
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /**
  19. * check file (un)encrypted?
  20. * @param file_path
  21. * @return
  22. */
  23. PDD_MODEL_API int paddle_check_stream_encrypted(std::istream &cipher_stream);
  24. PDD_MODEL_API int decrypt_stream(std::istream &cipher_stream, std::ostream &plain_stream, const std::string &key_base64);
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif //PADDLE_MODEL_PROTECT_API_PADDLE_MODEL_DECRYPT_H