/ohos5.0/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()
|
/ohos5.0/base/security/device_auth/common_lib/impl/src/ |
H A D | string_util.c | 34 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() 44 for (uint32_t i = 0; i < byteLen; i++) { in ByteToHexString() 48 hexStr[byteLen * BYTE_TO_HEX_OPER_LENGTH] = '\0'; in ByteToHexString() 66 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument 73 … 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()
|
/ohos5.0/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);
|
/ohos5.0/base/security/device_auth/common_lib/interfaces/ |
H A D | string_util.h | 38 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen); 48 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);
|
/ohos5.0/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… 34 int32_t MbedtlsBase64Decode(const char *base64Str, uint32_t strLen, uint8_t *byte, uint32_t byteLen…
|
/ohos5.0/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… 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… 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() 615 …res = mbedtls_base64_decode(byte, byteLen, &needBuffLen, (const unsigned char *)base64Str, strLen); in MbedtlsBase64Decode()
|
/ohos5.0/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()
|
/ohos5.0/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);
|
/ohos5.0/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cert_manager_auth_mgr.c | 57 static int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument 59 if (hexLen < (byteLen * BYTE_TO_HEX_OPER_LENGTH + 1)) { /* The terminator('\0') needs 1 bit */ in ByteToHexString() 63 for (uint32_t i = 0; i < byteLen; ++i) { in ByteToHexString() 67 hexStr[byteLen * BYTE_TO_HEX_OPER_LENGTH] = '\0'; in ByteToHexString() 72 static int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument 76 …if ((realHexLen % BYTE_TO_HEX_OPER_LENGTH != 0) || (byteLen < realHexLen / BYTE_TO_HEX_OPER_LENGTH… in HexStringToByte()
|
/ohos5.0/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);
|
/ohos5.0/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()
|
/ohos5.0/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()
|
/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/font_napi/ |
H A D | js_font.cpp | 602 size_t byteLen = currentStr - str; in OnMeasureSingleCharacter() local 603 if (byteLen != len) { in OnMeasureSingleCharacter()
|
/ohos5.0/commonlibrary/ets_utils/js_api_module/buffer/ |
H A D | native_module_buffer.cpp | 639 size_t byteLen = 0; in Utf8ByteLength() local 640 NAPI_CALL(env, napi_get_value_string_utf8(env, args[0], nullptr, 0, &byteLen)); in Utf8ByteLength() 642 napi_create_uint32(env, byteLen, &result); in Utf8ByteLength()
|
/ohos5.0/foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing/canvas_napi/ |
H A D | js_canvas.cpp | 1116 size_t byteLen = currentStr - str; in OnDrawSingleCharacter() local 1117 if (byteLen != len) { in OnDrawSingleCharacter()
|