1 /* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef AUTH_APPLY_KEY_PROCESS_H 17 #define AUTH_APPLY_KEY_PROCESS_H 18 19 #include <securec.h> 20 #include <stdbool.h> 21 #include <stdint.h> 22 23 #include "auth_apply_key_struct.h" 24 25 #ifdef __cplusplus 26 extern "C" { 27 #endif 28 29 int32_t AuthFindApplyKey( 30 const RequestBusinessInfo *info, uint8_t *applyKey, char *accountHash, uint32_t accountHashLen); 31 int32_t AuthGenApplyKey( 32 const RequestBusinessInfo *info, uint32_t requestId, uint32_t connId, const GenApplyKeyCallback *genCb); 33 uint32_t GenApplyKeySeq(void); 34 bool AuthIsApplyKeyExpired(uint64_t time); 35 int32_t ApplyKeyNegoInit(void); 36 void ApplyKeyNegoDeinit(void); 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif // AUTH_APPLY_KEY_PROCESS_H