Home
last modified time | relevance | path

Searched refs:hexLen (Results 1 - 13 of 13) sorted by relevance

/base/security/device_security_level/baselib/utils/src/
H A Dutils_hexstring.c37 void DslmByteToHexString(const uint8_t *hex, uint32_t hexLen, uint8_t *str, uint32_t strLen) in DslmByteToHexString() argument
39 if ((hex == NULL) || (str == NULL) || (strLen < hexLen * BYTE_TO_HEX_OPER_LENGTH)) { in DslmByteToHexString()
43 for (uint32_t i = 0; i < hexLen; i++) { in DslmByteToHexString()
49 int32_t DslmHexStringToByte(const char *str, uint32_t strLen, uint8_t *hex, uint32_t hexLen) in DslmHexStringToByte() argument
56 if (hexLen < outLen) { /* test the length */ in DslmHexStringToByte()
/base/security/device_security_level/baselib/utils/include/
H A Dutils_hexstring.h25 void DslmByteToHexString(const uint8_t *hex, uint32_t hexLen, uint8_t *str, uint32_t strLen);
27 int32_t DslmHexStringToByte(const char *str, uint32_t strLen, uint8_t *hex, uint32_t hexLen);
/base/security/device_auth/common_lib/impl/src/
H A Dstring_util.c35 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument
41 if (hexLen < byteLen * BYTE_TO_HEX_OPER_LENGTH + 1) { in ByteToHexString()
138 uint32_t hexLen = msgLen * BYTE_TO_HEX_OPER_LENGTH + 1; in PrintBuffer() local
139 char *hexStr = (char *)HcMalloc(hexLen, 0); in PrintBuffer()
143 (void)ByteToHexString(msgBuff, msgLen, hexStr, hexLen); in PrintBuffer()
H A Djson_utils.c448 uint32_t hexLen = len * BYTE_TO_HEX_OPER_LENGTH + 1; in AddByteToJson() local
449 char *hexStr = (char *)HcMalloc(hexLen, 0); in AddByteToJson()
453 int32_t ret = ByteToHexString(byte, len, hexStr, hexLen); in AddByteToJson()
/base/hiviewdfx/hiview/core/test/unittest/common/
H A Dparam_update_test.cpp55 const int hexLen = 2; in CreateEncFile() local
59 i += hexLen; in CreateEncFile()
/base/security/dlp_permission_service/frameworks/common/src/
H A Dhex_string.cpp31 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument
40 if (hexLen < byteLen * BYTE_TO_HEX_OPER_LENGTH + 1) { in ByteToHexString()
/base/security/dlp_permission_service/frameworks/common/include/
H A Dhex_string.h25 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen);
/base/security/device_auth/common_lib/interfaces/
H A Dstring_util.h51 * @param hexLen: length of hexStr, must be not shorter than byteLen * 2 + 1, for '\0'
54 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen);
/base/security/device_security_level/test/dslm_unit_test/
H A Ddslm_baselib_utils_test.cpp619 uint32_t hexLen = sizeof(hex); in HWTEST_F() local
626 DslmByteToHexString(hex, hexLen, nullptr, 0); in HWTEST_F()
629 DslmByteToHexString(hex, hexLen, str, strLen - 1); in HWTEST_F()
641 uint32_t hexLen = 5; in HWTEST_F() local
647 int32_t ret = DslmHexStringToByte(nullptr, 0, hex, hexLen); in HWTEST_F()
659 int32_t ret = DslmHexStringToByte(str, strLen, hex, hexLen - 2); in HWTEST_F()
/base/security/device_auth/test/unittest/deviceauth/source/
H A Djson_utils_mock.c481 uint32_t hexLen = len * BYTE_TO_HEX_OPER_LENGTH + 1; in AddByteToJson() local
482 char *hexStr = (char *)HcMalloc(hexLen, 0); in AddByteToJson()
486 int32_t ret = ByteToHexString(byte, len, hexStr, hexLen); in AddByteToJson()
/base/security/device_auth/services/legacy/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
H A Dpake_v1_protocol_task_common.c493 uint32_t hexLen = pseudonymIdBuff->length * BYTE_TO_HEX_OPER_LENGTH + 1; in AddPseudonymIdToPayload() local
494 char *hexStr = (char *)HcMalloc(hexLen, 0); in AddPseudonymIdToPayload()
499 int32_t res = ByteToHexString(pseudonymIdBuff->val, pseudonymIdBuff->length, hexStr, hexLen); in AddPseudonymIdToPayload()
526 uint32_t hexLen = pseudonymChlgBuff->length * BYTE_TO_HEX_OPER_LENGTH + 1; in AddPseudonymChallengeToPayload() local
527 char *hexStr = (char *)HcMalloc(hexLen, 0); in AddPseudonymChallengeToPayload()
532 int32_t res = ByteToHexString(pseudonymChlgBuff->val, pseudonymChlgBuff->length, hexStr, hexLen); in AddPseudonymChallengeToPayload()
/base/security/device_auth/services/legacy/group_auth/src/group_auth_manager/account_related_group_auth/
H A Daccount_related_group_auth.c468 uint32_t hexLen = hashBuff.length * BYTE_TO_HEX_OPER_LENGTH + 1; in GetPeerUserIdFromReceivedData() local
469 *peerUserId = (char *)HcMalloc(hexLen, 0); in GetPeerUserIdFromReceivedData()
474 res = ByteToHexString(hashBuff.val, hashBuff.length, *peerUserId, hexLen); in GetPeerUserIdFromReceivedData()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
H A Dcert_manager_auth_mgr.c58 static int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument
60 if (hexLen < (byteLen * BYTE_TO_HEX_OPER_LENGTH + 1)) { /* The terminator('\0') needs 1 bit */ in ByteToHexString()

Completed in 15 milliseconds