utils_base64.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Tencent is pleased to support the open source community by making IoT Hub
  3. available.
  4. * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
  5. * Licensed under the MIT License (the "License"); you may not use this file
  6. except in
  7. * compliance with the License. You may obtain a copy of the License at
  8. * http://opensource.org/licenses/MIT
  9. * Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is
  11. * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  12. KIND,
  13. * either express or implied. See the License for the specific language
  14. governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. #ifndef QCLOUD_IOT_UTILS_BASE64_H_
  19. #define QCLOUD_IOT_UTILS_BASE64_H_
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. #include <stdio.h>
  24. #include "qcloud_iot_export_error.h"
  25. #include "qcloud_iot_export_log.h"
  26. int qcloud_iot_utils_base64encode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen);
  27. int qcloud_iot_utils_base64decode(unsigned char *dst, size_t dlen, size_t *olen, const unsigned char *src, size_t slen);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif /* QCLOUD_IOT_UTILS_BASE64_H_ */