file.h 551 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright 2014-2023 The GmSSL Project. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the License); you may
  5. * not use this file except in compliance with the License.
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. */
  9. #ifndef GMSSL_FILE_H
  10. #define GMSSL_FILE_H
  11. #include <stdio.h>
  12. #include <string.h>
  13. #include <stdint.h>
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. int file_size(FILE *fp, size_t *size);
  18. int file_read_all(const char *file, uint8_t **out, size_t *outlen);
  19. #ifdef __cplusplus
  20. }
  21. #endif
  22. #endif