/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 36 if (byteLen > (UINT32_MAX / BYTE_TO_HEX_OPER_LENGTH)) { in ByteToHexString() 40 if (hexLen < byteLen * BYTE_TO_HEX_OPER_LENGTH + 1) { in ByteToHexString() 44 for (uint32_t i = 0; i < byteLen; i++) { in ByteToHexString() 48 hexStr[byteLen * BYTE_TO_HEX_OPER_LENGTH] = '\0'; in ByteToHexString() 67 int32_t HexStringToByte(const char *hexStr, uint32_t hexStrLen, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument 73 if (hexStrLen % BYTE_TO_HEX_OPER_LENGTH != 0 || byteLen < hexStrLen / BYTE_TO_HEX_OPER_LENGTH) { in HexStringToByte()
|
/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() 45 for (uint32_t i = 0; i < byteLen; i++) {
in ByteToHexString() 49 hexStr[byteLen * BYTE_TO_HEX_OPER_LENGTH] = '\0';
in ByteToHexString() 67 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen)
in HexStringToByte() argument 74 if (realHexLen % BYTE_TO_HEX_OPER_LENGTH != 0 || byteLen < realHexLen / BYTE_TO_HEX_OPER_LENGTH) {
in HexStringToByte()
|
H A D | json_utils.c | 220 int32_t GetByteLenFromJson(const CJson *jsonObj, const char *key, uint32_t *byteLen)
in GetByteLenFromJson() argument 222 if (jsonObj == NULL || key == NULL || byteLen == NULL) {
in GetByteLenFromJson() 230 *byteLen = HcStrlen(valueStr) / BYTE_TO_HEX_OPER_LENGTH;
in GetByteLenFromJson()
|
/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); 26 int32_t HexStringToByte(const char *hexStr, uint32_t hexStrLen, uint8_t *byte, uint32_t byteLen);
|
/base/telephony/core_service/test/unittest/utils_codec_gtest/ |
H A D | asn1_node_test.cpp | 153 int32_t byteLen = 0; in HWTEST_F() local 155 byteLen = responseByte.size(); in HWTEST_F() 156 std::shared_ptr<Asn1Node> root = Asn1ParseResponse(responseByte, byteLen); in HWTEST_F() 173 int32_t byteLen = 0; in HWTEST_F() local 175 byteLen = responseByte.size(); in HWTEST_F() 176 std::shared_ptr<Asn1Node> root = Asn1ParseResponse(responseByte, byteLen); in HWTEST_F() 208 int32_t byteLen = 0; in HWTEST_F() local 210 byteLen = responseByte.size(); in HWTEST_F() 211 std::shared_ptr<Asn1Node> root = Asn1ParseResponse(responseByte, byteLen); in HWTEST_F() 237 int32_t byteLen in HWTEST_F() local 267 int32_t byteLen = responseByte.size(); HWTEST_F() local 294 int32_t byteLen = responseByte.size(); HWTEST_F() local [all...] |
H A D | asn1_builder_test.cpp | 66 int32_t byteLen = 0; in HWTEST_F() local 69 ret = builder->Asn1AddChildAsBytes(tag, childByte, byteLen); in HWTEST_F() 77 ret = builder->Asn1AddChildAsBytes(tag, childByte, byteLen); in HWTEST_F() 81 ret = builder->Asn1AddChildAsBytes(tag, childByte, byteLen); in HWTEST_F()
|
H A D | asn1_utils_test.cpp | 163 uint32_t byteLen = responseByte.size(); in HWTEST_F() local 164 ret = byteLen == 0 ? true : false; in HWTEST_F() 200 int32_t byteLen = Asn1Utils::BytesToInt(responseByte, offset, responseByte.size()); in HWTEST_F() local 201 ret = byteLen == 0 ? true : false; in HWTEST_F()
|
/base/security/device_auth/common_lib/interfaces/ |
H A D | string_util.h | 41 * @param byteLen: the length of byte, must be not shorter than strlen(hexStr) / 2
44 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen);
49 * @param byteLen: the length of byte
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);
|
H A D | json_utils.h | 84 int32_t GetByteLenFromJson(const CJson *jsonObj, const char *key, uint32_t *byteLen);
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/inc/ |
H A D | mbedtls_ec_adapter.h | 33 int32_t MbedtlsBase64Encode(const uint8_t *byte, uint32_t byteLen, char *base64Str, uint32_t strLen, uint32_t *outLen);
34 int32_t MbedtlsBase64Decode(const char *base64Str, uint32_t strLen, uint8_t *byte, uint32_t byteLen, uint32_t *outLen);
|
/base/telephony/core_service/utils/codec/src/ |
H A D | asn1_decoder.cpp | 30 TELEPHONY_LOGE("Out of the bounds: byteLen=%{public}zu, offset=%{public}u, decodeLen=%{public}u.", in Asn1Decoder() 39 TELEPHONY_LOGD("byteLen:%{public}zu, offset:%{public}u, decodeLen:%{public}u", src.size(), offset, decodeLen); in Asn1Decoder() 89 uint8_t byteLen = srcData_[offset]; in BuildAsn1Node() local 92 if ((byteLen & BIT8_MASK) == 0) { in BuildAsn1Node() 93 dataLen = static_cast<uint32_t>(byteLen); in BuildAsn1Node() 95 uint32_t lenLen = static_cast<uint32_t>(byteLen & MAX_INT8); in BuildAsn1Node()
|
H A D | asn1_node.cpp | 48 uint32_t byteLen = Asn1NodeToBytes(byteStream); in Asn1NodeToHexStr() local 55 uint32_t byteLen = 0; in Asn1NodeToBytes() local 58 return byteLen; in Asn1NodeToBytes() 222 uint32_t byteLen = Asn1Utils::UintToBytes(tag_, byteStream); in Asn1GetHeadAsHexStr() local 223 if (byteLen == 0 || byteStream.empty()) { in Asn1GetHeadAsHexStr() 240 byteLen = Asn1Utils::UintToBytes(dataLength_, dataLenStream); in Asn1GetHeadAsHexStr() 241 if (byteLen == 0 || dataLenStream.empty()) { in Asn1GetHeadAsHexStr()
|
H A D | asn1_builder.cpp | 40 int32_t Asn1Builder::Asn1AddChildAsBytes(uint32_t tag, const std::vector<uint8_t> &childByte, uint32_t byteLen) in Asn1AddChildAsBytes() argument 52 std::shared_ptr<Asn1Node> node = std::make_shared<Asn1Node>(tag, childByte, 0, byteLen); in Asn1AddChildAsBytes()
|
/base/telephony/core_service/services/sim/include/ |
H A D | sim_utils.h | 75 static std::string BytesConvertToHexString(const unsigned char *bytes, int byteLen); 85 static std::string Gsm7bitConvertToString(const unsigned char *bytes, int byteLen);
|
/base/telephony/core_service/utils/codec/include/ |
H A D | asn1_builder.h | 33 int32_t Asn1AddChildAsBytes(uint32_t tag, const std::vector<uint8_t> &childByte, uint32_t byteLen);
|
/base/security/device_auth/deps_adapter/key_management_adapter/impl/src/common/ |
H A D | mbedtls_ec_adapter.c | 568 int32_t MbedtlsBase64Encode(const uint8_t *byte, uint32_t byteLen, char *base64Str, uint32_t strLen, uint32_t *outLen) in MbedtlsBase64Encode() argument 571 CHECK_LEN_ZERO_RETURN_ERROR_CODE(byteLen, "byteLen"); in MbedtlsBase64Encode() 577 (void)mbedtls_base64_encode(NULL, 0, &needBuffLen, byte, byteLen); in MbedtlsBase64Encode() 584 int res = mbedtls_base64_encode((unsigned char *)base64Str, strLen, &needBuffLen, byte, byteLen); in MbedtlsBase64Encode() 594 int32_t MbedtlsBase64Decode(const char *base64Str, uint32_t strLen, uint8_t *byte, uint32_t byteLen, uint32_t *outLen) in MbedtlsBase64Decode() argument 599 CHECK_LEN_ZERO_RETURN_ERROR_CODE(byteLen, "byteLen"); in MbedtlsBase64Decode() 609 if (needBuffLen > byteLen) { in MbedtlsBase64Decode() 611 needBuffLen, byteLen); in MbedtlsBase64Decode() [all...] |
/base/telephony/core_service/services/sim/src/ |
H A D | sim_utils.cpp | 63 std::string SIMUtils::BytesConvertToHexString(const unsigned char *bytes, int byteLen) in BytesConvertToHexString() argument 69 for (int i = 0; i < byteLen; i++) { in BytesConvertToHexString() 159 std::string SIMUtils::Gsm7bitConvertToString(const unsigned char *bytes, int byteLen) in Gsm7bitConvertToString() argument 169 n = (byteLen * BYTE_LENGTH) / CHAR_GSM_7BIT; in Gsm7bitConvertToString() 170 TELEPHONY_LOGI("Gsm7bitConvertToString byteLen:%{public}d", byteLen); in Gsm7bitConvertToString()
|
H A D | esim_file.cpp | 367 uint32_t byteLen = profileRoot->Asn1AsBytes(outPutBytes);
in ProcessObtainEidDone() local 368 if (byteLen == 0) {
in ProcessObtainEidDone() 369 TELEPHONY_LOGE("byteLen is zero!");
in ProcessObtainEidDone() 405 uint32_t byteLen = responseByte.size();
in ProcessObtainEuiccInfo1Done() local 406 std::shared_ptr<Asn1Node> root = Asn1ParseResponse(responseByte, byteLen);
in ProcessObtainEuiccInfo1Done() 1018 uint32_t byteLen = profileRoot->Asn1AsBytes(profileResponseByte);
in ProcessObtainEuiccChallengeDone() local 1019 if (byteLen == 0) {
in ProcessObtainEuiccChallengeDone() 1211 uint32_t byteLen = profileRoot->Asn1AsBytes(outPutBytes);
in ProcessObtainDefaultSmdpAddressDone() local 1212 if (byteLen == 0) {
in ProcessObtainDefaultSmdpAddressDone() 1213 TELEPHONY_LOGE("byteLen i in ProcessObtainDefaultSmdpAddressDone() 1232 uint32_t byteLen = root->Asn1AsString(responseResult); ProcessCancelSessionDone() local 1729 uint32_t byteLen = responseByte.size(); ProcessPrepareDownloadDone() local 1912 uint32_t byteLen = responseByte.size(); RealProcessLoadBoundProfilePackageDone() local 2137 uint32_t byteLen = responseByte.size(); ProcessListNotificationsDone() local 2338 uint32_t byteLen = responseByte.size(); ProcessRetrieveNotificationDone() local 2851 uint32_t byteLen = responseByte.size(); ProcessObtainEuiccInfo2Done() local 3208 uint32_t byteLen = responseByte.size(); ParseEvent() local [all...] |
/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() 64 for (uint32_t i = 0; i < byteLen; ++i) { in ByteToHexString() 68 hexStr[byteLen * BYTE_TO_HEX_OPER_LENGTH] = '\0'; in ByteToHexString() 73 static int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument 77 if ((realHexLen % BYTE_TO_HEX_OPER_LENGTH != 0) || (byteLen < realHexLen / BYTE_TO_HEX_OPER_LENGTH)) { in HexStringToByte()
|
/base/telephony/core_service/test/unittest/esim_gtest/ |
H A D | esim_test.cpp | 617 uint32_t byteLen = responseByte.size();
in HWTEST_F() local 618 std::shared_ptr<Asn1Node> root = esimFile->Asn1ParseResponse(responseByte, byteLen);
in HWTEST_F() 620 byteLen = 0;
in HWTEST_F() 1245 uint32_t byteLen = responseByte.size();
in HWTEST_F() local 1246 std::shared_ptr<Asn1Node> root = esimFile->Asn1ParseResponse(responseByte, byteLen);
in HWTEST_F() 1309 uint32_t byteLen = responseByte.size();
in HWTEST_F() local 1310 std::shared_ptr<Asn1Node> node = esimFile->Asn1ParseResponse(responseByte, byteLen);
in HWTEST_F() 1325 uint32_t byteLen = responseByte.size();
in HWTEST_F() local 1326 std::shared_ptr<Asn1Node> node = esimFile->Asn1ParseResponse(responseByte, byteLen);
in HWTEST_F() 1340 uint32_t byteLen in HWTEST_F() local 1357 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1371 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1385 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1547 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1859 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1875 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1891 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1907 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1923 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1939 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1955 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1971 uint32_t byteLen = responseByte.size(); HWTEST_F() local 1987 uint32_t byteLen = responseByte.size(); HWTEST_F() local 2003 uint32_t byteLen = responseByte.size(); HWTEST_F() local 2019 uint32_t byteLen = responseByte.size(); HWTEST_F() local [all...] |
/base/security/device_auth/deps_adapter/key_management_adapter/interfaces/ |
H A D | alg_defs.h | 146 typedef int32_t (*Base64EncodeFunc)(const uint8_t *byte, uint32_t byteLen, 150 uint8_t *byte, uint32_t byteLen, uint32_t *outLen);
|
/base/security/device_auth/test/unittest/deviceauth/source/ |
H A D | json_utils_mock.c | 253 int32_t GetByteLenFromJson(const CJson *jsonObj, const char *key, uint32_t *byteLen) in GetByteLenFromJson() argument 255 if (jsonObj == NULL || key == NULL || byteLen == NULL) { in GetByteLenFromJson() 263 *byteLen = strlen(valueStr) / BYTE_TO_HEX_OPER_LENGTH; in GetByteLenFromJson()
|
/base/update/updater/services/ptable_parse/ |
H A D | ptable.cpp | 198 const uint32_t byteLen = 8; // 8:length of unit (i.e. byte) in CalculateCrc32() local 207 for (uint32_t j = 0; j < byteLen; j++) { in CalculateCrc32() 208 msb = dataByte >> (byteLen - 1); // get MSB in CalculateCrc32()
|