11b8d9b87Sopenharmony_ci/* 21b8d9b87Sopenharmony_ci * Copyright (C) 2022-2023 Huawei Device Co., Ltd. 31b8d9b87Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 41b8d9b87Sopenharmony_ci * you may not use this file except in compliance with the License. 51b8d9b87Sopenharmony_ci * You may obtain a copy of the License at 61b8d9b87Sopenharmony_ci * 71b8d9b87Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 81b8d9b87Sopenharmony_ci * 91b8d9b87Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 101b8d9b87Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 111b8d9b87Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 121b8d9b87Sopenharmony_ci * See the License for the specific language governing permissions and 131b8d9b87Sopenharmony_ci * limitations under the License. 141b8d9b87Sopenharmony_ci */ 151b8d9b87Sopenharmony_ci 161b8d9b87Sopenharmony_ci#ifndef HCF_BLOB_H 171b8d9b87Sopenharmony_ci#define HCF_BLOB_H 181b8d9b87Sopenharmony_ci 191b8d9b87Sopenharmony_ci#include <stddef.h> 201b8d9b87Sopenharmony_ci#include <stdint.h> 211b8d9b87Sopenharmony_ci 221b8d9b87Sopenharmony_citypedef struct HcfBlob HcfBlob; 231b8d9b87Sopenharmony_cistruct HcfBlob { 241b8d9b87Sopenharmony_ci uint8_t *data; 251b8d9b87Sopenharmony_ci size_t len; 261b8d9b87Sopenharmony_ci}; 271b8d9b87Sopenharmony_ci 281b8d9b87Sopenharmony_cienum EncodingFormat { 291b8d9b87Sopenharmony_ci HCF_FORMAT_DER = 0, 301b8d9b87Sopenharmony_ci HCF_FORMAT_PEM = 1, 311b8d9b87Sopenharmony_ci}; 321b8d9b87Sopenharmony_ci 331b8d9b87Sopenharmony_ci#ifdef __cplusplus 341b8d9b87Sopenharmony_ciextern "C" { 351b8d9b87Sopenharmony_ci#endif 361b8d9b87Sopenharmony_ci 371b8d9b87Sopenharmony_civoid HcfBlobDataFree(HcfBlob *blob); 381b8d9b87Sopenharmony_civoid HcfBlobDataClearAndFree(HcfBlob *blob); 391b8d9b87Sopenharmony_ci 401b8d9b87Sopenharmony_ci#ifdef __cplusplus 411b8d9b87Sopenharmony_ci} 421b8d9b87Sopenharmony_ci#endif 431b8d9b87Sopenharmony_ci 441b8d9b87Sopenharmony_ci#endif 45