Home
last modified time | relevance | path

Searched refs:hex (Results 1 – 23 of 23) sorted by relevance

/base/security/huks/frameworks/huks_standard/main/crypto_engine/test/unittest/
Dhks_crypto_hal_common.cpp18 uint8_t HksCryptoHalCommon::HexChar(char hex) const in HexChar()
20 if (hex >= '0' && hex <= '9') { in HexChar()
21 return hex - '0'; in HexChar()
22 } else if (hex >= 'A' && hex <= 'F') { in HexChar()
23 return hex - 'A' + 0X0A; in HexChar()
24 } else if (hex >= 'a' && hex <= 'f') { in HexChar()
25 return hex - 'a' + 0X0A; in HexChar()
31 uint8_t HksCryptoHalCommon::ReadHex(const uint8_t hex[2]) const in ReadHex()
33 return HexChar(*hex) * 16 + HexChar(*(hex + 1)); in ReadHex()
Dhks_crypto_hal_common.h29 uint8_t HexChar(char hex) const;
30 uint8_t ReadHex(const uint8_t hex[2]) const;
/base/security/device_security_level/baselib/utils/src/
Dutils_hexstring.c32 static char HexToChar(uint8_t hex) in HexToChar() argument
34 …return (hex > 9) ? (hex + 0x37) : (hex + 0x30); /* check if bigger than 9, then add 0x37 or 0x30 */ in HexToChar()
37 void ByteToHexString(const uint8_t *hex, uint32_t hexLen, uint8_t *str, uint32_t strLen) in ByteToHexString() argument
44 …str[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((hex[i] & 0xF0) >> 4); /* shift 4 right for filling */ in ByteToHexString()
45 str[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(hex[i] & 0x0F); /* get low four bits */ in ByteToHexString()
49 int32_t HexStringToByte(const char *str, uint32_t strLen, uint8_t *hex, uint32_t hexLen) in HexStringToByte() argument
77 hex[i] = nibble[0] << 4; /* Set the high nibble, shift 4 */ in HexStringToByte()
78 hex[i] |= nibble[1]; /* Set the low nibble */ in HexStringToByte()
/base/security/deviceauth/frameworks/deviceauth_lite/source/json/
Dcommonutil.c23 char hex_to_char(uint8_t hex) in hex_to_char() argument
26 return (hex > 9) ? hex + 0x37 : hex + 0x30; in hex_to_char()
29 void byte_to_hex_string(const uint8_t *hex, int32_t hex_len, uint8_t *buf, int32_t buf_len) in byte_to_hex_string() argument
35 …buf[i * BYTE_TO_HEX_OPER_LENGTH] = hex_to_char((hex[i] & 0xF0) >> 4); /* shift right for filling */ in byte_to_hex_string()
36 buf[i * BYTE_TO_HEX_OPER_LENGTH + 1] = hex_to_char(hex[i] & 0x0F); /* get low four bits */ in byte_to_hex_string()
40 int32_t hex_string_to_byte(const char *str, int32_t len, uint8_t *hex) in hex_string_to_byte() argument
65 hex[i] = nibble[0] << 4; /* Set the high nibble */ in hex_string_to_byte()
66 hex[i] |= nibble[1]; /* Set the low nibble */ in hex_string_to_byte()
85 int32_t byte_convert(json_pobject obj, const char *field, uint8_t *hex, uint32_t *length, uint32_t … in byte_convert() argument
96 if (hex_string_to_byte(str_json, len, hex) != HC_OK) { in byte_convert()
Dcommonutil.h24 int32_t hex_string_to_byte(const char *str, int32_t len, uint8_t *hex);
25 void byte_to_hex_string(const uint8_t *hex, int32_t hex_len, uint8_t *buf, int32_t buf_len);
29 int32_t byte_convert(json_pobject obj, const char *field, uint8_t *hex, uint32_t *length, uint32_t …
/base/security/device_security_level/baselib/utils/include/
Dutils_hexstring.h25 void ByteToHexString(const uint8_t *hex, uint32_t hexLen, uint8_t *str, uint32_t strLen);
27 int32_t HexStringToByte(const char *str, uint32_t strLen, uint8_t *hex, uint32_t hexLen);
/base/telephony/sms_mms/frameworks/native/mms/src/utils/
Dmms_quoted_printable.cpp26 …const char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'… in Encode() local
33 codeString += hex[((byte >> 0x04) & 0x0F)]; in Encode()
34 codeString += hex[(byte & 0x0F)]; in Encode()
/base/security/deviceauth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/
Dpake_v1_protocol_task_common.c100 static void UpperToLowercase(Uint8Buff *hex) in UpperToLowercase() argument
102 for (uint32_t i = 0; i < hex->length; i++) { in UpperToLowercase()
103 if (hex->val[i] >= 'A' && hex->val[i] <= 'F') { in UpperToLowercase()
104 hex->val[i] += ASCII_CASE_DIFFERENCE_VALUE; in UpperToLowercase()
/base/security/deviceauth/common_lib/impl/src/
Dstring_util.c44 static char HexToChar(uint8_t hex) in HexToChar() argument
46 …return (hex > NUMBER_9_IN_DECIMAL) ? (hex + 0x37) : (hex + 0x30); /* Convert to the corresponding … in HexToChar()
/base/security/deviceauth/frameworks/deviceauth_lite/source/struct/
Dkey_agreement_version.h30 uint8_t *raw_byte_to_hex_string(const uint8_t *hex, int32_t length);
Dkey_agreement_version.c86 uint8_t *raw_byte_to_hex_string(const uint8_t *hex, int32_t length) in raw_byte_to_hex_string() argument
94 byte_to_hex_string(hex, length, tmp_cha_data_hex, length * BYTE_TO_HEX_OPER_LENGTH); in raw_byte_to_hex_string()
/base/hiviewdfx/faultloggerd/tools/crasher_cpp/
Ddfx_crasher.cpp192 std::cout << std::hex << "old rlimit, cur:0x" << oldRlimit.rlim_cur << std::endl; in Oom()
193 std::cout << std::hex << "old rlimit, max:0x" << oldRlimit.rlim_max << std::endl; in Oom()
282 std::cout << "crasher_c: stack top is = " << std::hex << stackTop << std::endl; in StackTop()
286 fout << std::hex << stackTop << std::endl; in StackTop()
/base/hiviewdfx/hiview/base/utility/
Dstring_util.cpp123 ioss << setiosflags(ios::uppercase) << hex << value; in DexToHexString()
125 ioss << hex << value; in DexToHexString()
/base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/
Dsignal_info.cpp30 …ss << "@" << std::setw(8) << std::setfill('0') << std::hex << siginfo.si_addr << " "; // 8 : bit w… in FormatSignalInfo()
/base/telephony/core_service/services/sim/src/
Dtag_service.cpp108 …ss << std::setiosflags(std::ios::uppercase) << std::hex << std::setw(WORD_LEN) << std::setfill('0'… in HexVecToHexStr()
Dsim_number_decode.cpp29 ss << std::hex << std::uppercase << std::setw(2) << std::setfill('0') << v; in HexToStr()
/base/hiviewdfx/hilog/services/hilogd/
Dflow_control_init.cpp134 std::cout << ", id: " << std::hex << domainId << std::dec; in ParseDomainQuota()
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/
Dhisysevent.cpp192 eventBase.jsonStr_ << "\"" << key << "\":\"" << std::hex << value << "\"," << std::dec; in AppendHexData()
/base/hiviewdfx/hilog/services/hilogtool/
Dlog_controller.cpp183 std::istringstream(context->domains[i]) >> std::hex >> logQueryRequest.domains[i]; in LogQueryRequestOp()
200 std::istringstream(context->noDomains[i]) >> std::hex >> logQueryRequest.noDomains[i]; in LogQueryRequestOp()
/base/account/os_account/services/accountmgr/src/
Dohos_account_manager.cpp83 ss << std::hex << std::uppercase << std::setw(WIDTH_FOR_HEX) in GenerateOhosUdidWithSha256()
/base/hiviewdfx/hilog/frameworks/native/
Doutput_p.inl861 /* unsigned upper hex output */
865 /* unsigned lower hex output */
1028 … /* Check if data is 0; if so, turn off hex prefix,if 'p',add 0x prefix,else not add prefix */
/base/accessibility/interfaces/kits/napi/src/
Dnapi_accessibility_utils.cpp1748 rgbStream << std::hex << std::setw(RGB_LENGTH) << std::setfill(UNICODE_BODY) << rgb; in ConvertColorToString()
1750 alphaStream << std::hex << std::setw(ALPHA_LENGTH) << std::setfill(UNICODE_BODY) << alpha; in ConvertColorToString()
/base/compileruntime/js_api_module/url/
Djs_url.cpp1646 ioss << std::hex << j; in ToString()