/base/security/device_security_level/baselib/utils/src/ |
H A D | utils_hexstring.c | 37 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 D | utils_hexstring.h | 25 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 D | string_util.c | 35 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 D | json_utils.c | 448 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 D | param_update_test.cpp | 55 const int hexLen = 2; in CreateEncFile() local 59 i += hexLen; in CreateEncFile()
|
/base/security/dlp_permission_service/frameworks/common/src/ |
H A D | hex_string.cpp | 31 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 D | hex_string.h | 25 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen);
|
/base/security/device_auth/common_lib/interfaces/ |
H A D | string_util.h | 51 * @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 D | dslm_baselib_utils_test.cpp | 619 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 D | json_utils_mock.c | 481 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 D | pake_v1_protocol_task_common.c | 493 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 D | account_related_group_auth.c | 468 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 D | cert_manager_auth_mgr.c | 58 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()
|