/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/ |
D | hks_crypto_hal_common.cpp | 18 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()
|
/base/startup/hvb/libhvb/src/utils/ |
D | hvb_util.c | 21 char *hex; in hvb_bin2hex() local 24 hex = hvb_malloc(len * 2 + 1); in hvb_bin2hex() 25 if (hex == NULL) in hvb_bin2hex() 29 hex[n * 2] = digits[value[n] >> 4]; in hvb_bin2hex() 30 hex[n * 2 + 1] = digits[value[n] & 0x0f]; in hvb_bin2hex() 32 hex[n * 2] = '\0'; in hvb_bin2hex() 34 return hex; in hvb_bin2hex() 60 uint64_t hex; in hvb_be64toh() local 62 hex = ((uint64_t)value[0]) << 56; in hvb_be64toh() 63 hex |= ((uint64_t)value[1]) << 48; in hvb_be64toh() [all …]
|
/base/security/device_security_level/baselib/utils/src/ |
D | utils_hexstring.c | 32 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 39 if ((hex == NULL) || (str == NULL) || (strLen < hexLen * BYTE_TO_HEX_OPER_LENGTH)) { in ByteToHexString() 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 51 …if ((str == NULL) || (hex == NULL) || (strLen % BYTE_TO_HEX_OPER_LENGTH)) { /* even number or not … in HexStringToByte() 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/device_auth/frameworks/deviceauth_lite/source/json/ |
D | commonutil.c | 23 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()
|
D | commonutil.h | 24 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/dlp_permission_service/frameworks/common/src/ |
D | hex_string.cpp | 24 static char HexToChar(uint8_t hex) in HexToChar() argument 26 …return (hex > 9) ? (hex + 0x37) : (hex + 0x30); // numbers greater than 9 are represented by lett… in HexToChar()
|
/base/security/device_security_level/baselib/utils/include/ |
D | utils_hexstring.h | 25 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/security/huks/test/unittest/huks_standard_test/crypto_engine_test/include/ |
D | hks_crypto_hal_common.h | 29 uint8_t HexChar(char hex) const; 30 uint8_t ReadHex(const uint8_t hex[2]) const;
|
/base/telephony/sms_mms/frameworks/native/mms/src/utils/ |
D | mms_quoted_printable.cpp | 35 …const char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'… in Encode() local 42 codeString += hex[((byte >> 0x04) & 0x0F)]; in Encode() 43 codeString += hex[(byte & 0x0F)]; in Encode()
|
/base/security/device_auth/services/authenticators/src/account_unrelated/pake_task/pake_v1_task/pake_v1_protocol_task/ |
D | pake_v1_protocol_task_common.c | 100 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/certificate_manager/frameworks/cert_manager_standard/main/common/src/ |
D | cm_x509.c | 71 char *hex = BN_bn2hex(bn); in GetX509SerialNumber() local 72 if (hex == NULL) { in GetX509SerialNumber() 77 uint32_t len = (uint32_t)strlen(hex); in GetX509SerialNumber() 79 OPENSSL_free(hex); in GetX509SerialNumber() 83 if (strncpy_s(outBuf, outBufMaxSize, hex, len) != EOK) { in GetX509SerialNumber() 84 OPENSSL_free(hex); in GetX509SerialNumber() 89 OPENSSL_free(hex); in GetX509SerialNumber()
|
/base/update/updater/services/ptable_parse/ |
D | ptable.cpp | 158 LOG(ERROR) << "seekp 0x" << std::hex << offset << " bytes in " << filePath << in MemReadWithOffset() 159 " failed. Now is in 0x" << std::hex << fin.tellg() << std::dec; in MemReadWithOffset() 165 LOG(ERROR) << "read 0x" << std::hex << dataSize << " bytes in " << filePath << in MemReadWithOffset() 166 " failed. only read 0x" << std::hex << fin.gcount() << std::dec; in MemReadWithOffset() 254 LOG(INFO) << "the " << i << " main GPT's type=0x" << std::hex << type << std::dec; in CheckProtectiveMbr() 270 LOG(ERROR) << "invaild partiton with gptMagic:0x" << std::hex << gptMagic << std::dec; in CheckIfValidGpt() 297 LOG(INFO) << "lun capacity = 0x" << std::hex << capacity << std::dec; in GetCapacity() 343 … LOG(ERROR) << "Header crc mismatch crcVal = " << std::hex << crcVal << " with orgCrcVal = " << in CheckGptHeader() 406 …LOG(ERROR) << "partition entires crc mismatch crcVal =" << std::hex << crcVal << " with orgCrcVal … in PartitionCheckGptHeader() 425 ", startAddr=0x" << std::hex << partitionInfo_[i].startAddr << ", size=0x" << in PrintPtableInfo() [all …]
|
D | ufs_ptable.cpp | 361 LOG(INFO) << "GetPtableImageUfsLunPmbrStart : " << std::hex << pmbrStart << std::dec; in GetPtableImageUfsLunPmbrStart() 368 LOG(INFO) << "GetPtableImageUfsLunGptHeaderStart : " << std::hex << gptHeaderStart << std::dec; in GetPtableImageUfsLunGptHeaderStart() 376 LOG(INFO) << "GetPtableImageUfsLunEntryStart : " << std::hex << entryStart << std::dec; in GetPtableImageUfsLunEntryStart()
|
/base/security/device_security_level/test/dslm_unit_test/ |
D | dslm_baselib_utils_test.cpp | 449 const uint8_t hex[] = {0x1, 0xF, 0xE, 0x8, 0xA}; variable 450 uint32_t hexLen = sizeof(hex); 457 ByteToHexString(hex, hexLen, nullptr, 0); 460 ByteToHexString(hex, hexLen, str, strLen - 1); 474 uint8_t hex[5] = {0}; variable 478 int32_t ret = HexStringToByte(nullptr, 0, hex, hexLen); 490 int32_t ret = HexStringToByte(str, strLen, hex, hexLen - 2);
|
/base/security/device_auth/common_lib/impl/src/ |
D | string_util.c | 43 static char HexToChar(uint8_t hex) in HexToChar() argument 45 …return (hex > NUMBER_9_IN_DECIMAL) ? (hex + 0x37) : (hex + 0x30); /* Convert to the corresponding … in HexToChar()
|
/base/security/device_auth/frameworks/deviceauth_lite/source/struct/ |
D | key_agreement_version.h | 30 uint8_t *raw_byte_to_hex_string(const uint8_t *hex, int32_t length);
|
D | key_agreement_version.c | 86 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/startup/init/interfaces/innerkits/fs_manager/libfs_hvb/ |
D | fs_hvb.c | 61 static char FsHvbHexCharToBin(char hex) in FsHvbHexCharToBin() argument 63 return '0' <= hex && hex <= '9' ? hex - '0' : 10 + (hex - 'a'); in FsHvbHexCharToBin()
|
/base/useriam/pin_auth/common/utils/ |
D | iam_para2str.h | 32 ss << "0xXXXX" << std::setfill('0') << std::setw(MASK_WIDTH) << std::hex << val; in GetMaskedString()
|
/base/useriam/fingerprint_auth/common/utils/ |
D | iam_para2str.h | 32 ss << "0xXXXX" << std::setfill('0') << std::setw(MASK_WIDTH) << std::hex << val; in GetMaskedString()
|
/base/useriam/face_auth/common/utils/ |
D | iam_para2str.h | 32 ss << "0xXXXX" << std::setfill('0') << std::setw(MASK_WIDTH) << std::hex << val; in GetMaskedString()
|
/base/useriam/user_auth_framework/common/utils/ |
D | iam_para2str.h | 32 ss << "0xXXXX" << std::setfill('0') << std::setw(MASK_WIDTH) << std::hex << val; in GetMaskedString()
|
/base/telephony/sms_mms/services/sms/ |
D | sms_pdu_buffer.cpp | 129 SmsReadBuffer::SmsReadBuffer(const std::string &hex) in SmsReadBuffer() argument 131 size_t len = hex.length(); in SmsReadBuffer() 148 if (memcpy_s(data_.get(), len, hex.c_str(), len) != EOK) { in SmsReadBuffer()
|
/base/hiviewdfx/faultloggerd/tools/crasher_cpp/ |
D | dfx_crasher.cpp | 186 std::cout << std::hex << "old rlimit, cur:0x" << oldRlimit.rlim_cur << std::endl; in Oom() 187 std::cout << std::hex << "old rlimit, max:0x" << oldRlimit.rlim_max << std::endl; in Oom() 276 std::cout << "crasher_c: stack top is = " << std::hex << stackTop << std::endl; in StackTop() 280 fout << std::hex << stackTop << std::endl; in StackTop()
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
D | cert_manager_auth_mgr.c | 38 static char HexToChar(uint8_t hex) in HexToChar() argument 40 …return (hex > NUMBER_9_IN_DECIMAL) ? (hex + 0x37) : (hex + 0x30); /* Convert to the corresponding … in HexToChar()
|