Home
last modified time | relevance | path

Searched refs:byte (Results 1 – 19 of 19) sorted by relevance

/base/hiviewdfx/faultloggerd/common/
Ddfx_define.h82 #define BYTE_TO_BINARY(byte) \ argument
83 ((byte) & 0x80 ? '1' : '0'), \
84 ((byte) & 0x40 ? '1' : '0'), \
85 ((byte) & 0x20 ? '1' : '0'), \
86 ((byte) & 0x10 ? '1' : '0'), \
87 ((byte) & 0x08 ? '1' : '0'), \
88 ((byte) & 0x04 ? '1' : '0'), \
89 ((byte) & 0x02 ? '1' : '0'), \
90 ((byte) & 0x01 ? '1' : '0')
/base/security/device_auth/common_lib/impl/src/
Dstring_util.c48 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument
50 if (byte == NULL || hexStr == NULL) { in ByteToHexString()
59 …hexStr[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((byte[i] & 0xF0) >> 4); /* 4: shift right for fill… in ByteToHexString()
60 hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(byte[i] & 0x0F); /* get low four bits */ in ByteToHexString()
80 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument
82 if (byte == NULL || hexStr == NULL) { in HexStringToByte()
97 byte[i] = high << 4; /* 4: Set the high nibble */ in HexStringToByte()
98 byte[i] |= low; /* Set the low nibble */ in HexStringToByte()
125 int32_t Base64StringToByte(const char *base64Str, uint8_t *byte, uint32_t *byteLen) in Base64StringToByte() argument
127 if (base64Str == NULL || byte == NULL || byteLen == NULL) { in Base64StringToByte()
[all …]
Djson_utils.c209 int32_t GetByteFromJson(const CJson *jsonObj, const char *key, uint8_t *byte, uint32_t len) in GetByteFromJson() argument
211 if (jsonObj == NULL || key == NULL || byte == NULL) { in GetByteFromJson()
222 return HexStringToByte(valueStr, byte, len); in GetByteFromJson()
417 int32_t AddByteToJson(CJson *jsonObj, const char *key, const uint8_t *byte, uint32_t len) in AddByteToJson() argument
419 if (jsonObj == NULL || key == NULL || byte == NULL) { in AddByteToJson()
428 int32_t ret = ByteToHexString(byte, len, hexStr, hexLen); in AddByteToJson()
/base/security/dlp_permission_service/frameworks/common/src/
Dhex_string.cpp29 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument
31 if (byte == nullptr || hexStr == nullptr) { in ByteToHexString()
40 …hexStr[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((byte[i] & 0xF0) >> 4); // 4: shift right for fil… in ByteToHexString()
41 … hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(byte[i] & 0x0F); // get low four bits in ByteToHexString()
61 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument
63 if (byte == nullptr || hexStr == nullptr) { in HexStringToByte()
78 byte[i] = high << 4; // 4: Set the high nibble in HexStringToByte()
79 byte[i] |= low; // Set the low nibble in HexStringToByte()
/base/telephony/sms_mms/frameworks/native/mms/src/utils/
Dmms_quoted_printable.cpp37 for (auto byte : input) { in Encode() local
38 if ((byte >= asciiMin && byte < equalChar) || (byte > equalChar && byte <= assciiMax)) { in Encode()
39 codeString += byte; in Encode()
42 codeString += hex[((byte >> 0x04) & 0x0F)]; in Encode()
43 codeString += hex[(byte & 0x0F)]; in Encode()
/base/security/device_auth/common_lib/interfaces/
Dstring_util.h38 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);
65 int32_t Base64StringToByte(const char *base64Str, uint8_t *byte, uint32_t *byteLen);
75 int32_t ByteToBase64String(const uint8_t *byte, uint32_t byteLen, char *base64Str, uint32_t strLen);
Djson_utils.h83 int32_t GetByteFromJson(const CJson *jsonObj, const char *key, uint8_t *byte, uint32_t len);
95 int32_t AddByteToJson(CJson *jsonObj, const char *key, const uint8_t *byte, uint32_t len);
/base/security/device_security_level/baselib/utils/src/
Dutils_base64.c84 …uint32_t byte = (((a << 16) & 0x00FF0000) | ((b << 8) & 0x0000FF00) | ((c << 0) & 0x000000FF)); /*… in Base64Encode() local
86 to[j++] = g_base64EncodeTable[(byte >> 18) & 0x3F]; /* get the 1st block by shift 18 */ in Base64Encode()
87 to[j++] = g_base64EncodeTable[(byte >> 12) & 0x3F]; /* get the 2nd block by shift 12 */ in Base64Encode()
88 to[j++] = g_base64EncodeTable[(byte >> 6) & 0x3F]; /* get the 3rd block by shift 6 */ in Base64Encode()
89 to[j++] = g_base64EncodeTable[(byte >> 0) & 0x3F]; in Base64Encode()
144 uint32_t byte = in Base64Decode() local
148 to[j++] = (byte >> 16) & 0xFF; // 16, the 3rd 8-bit in Base64Decode()
151 to[j++] = (byte >> 8) & 0xFF; // 8, the 2nd 8-bit in Base64Decode()
154 to[j++] = (byte >> 0) & 0xFF; in Base64Decode()
/base/security/dlp_permission_service/frameworks/common/include/
Dhex_string.h25 int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen);
26 int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen);
/base/telephony/sms_mms/frameworks/native/mms/include/
Dmms_encode_buffer.h27 bool WriteByte(uint8_t byte);
/base/telephony/sms_mms/utils/
Dstring_utils.cpp93 std::string byte = str.substr(i, hexStep); in HexToString() local
95 long strTemp = strtol(byte.c_str(), nullptr, hexDecimal); in HexToString()
/base/security/device_auth/test/unittest/deviceauth/source/
Djson_utils_mock.c267 int32_t GetByteFromJson(const CJson *jsonObj, const char *key, uint8_t *byte, uint32_t len) in GetByteFromJson() argument
269 if (jsonObj == NULL || key == NULL || byte == NULL) { in GetByteFromJson()
280 return HexStringToByte(valueStr, byte, len); in GetByteFromJson()
475 int32_t AddByteToJson(CJson *jsonObj, const char *key, const uint8_t *byte, uint32_t len) in AddByteToJson() argument
477 if (jsonObj == NULL || key == NULL || byte == NULL) { in AddByteToJson()
486 int32_t ret = ByteToHexString(byte, len, hexStr, hexLen); in AddByteToJson()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_auth_mgr.c56 static int32_t ByteToHexString(const uint8_t *byte, uint32_t byteLen, char *hexStr, uint32_t hexLen) in ByteToHexString() argument
63 …hexStr[i * BYTE_TO_HEX_OPER_LENGTH] = HexToChar((byte[i] & 0xF0) >> 4); /* 4: shift right for fill… in ByteToHexString()
64 hexStr[i * BYTE_TO_HEX_OPER_LENGTH + 1] = HexToChar(byte[i] & 0x0F); /* get low four bits */ in ByteToHexString()
71 static int32_t HexStringToByte(const char *hexStr, uint8_t *byte, uint32_t byteLen) in HexStringToByte() argument
85 byte[i] = high << 4; /* 4: Set the high nibble */ in HexStringToByte()
86 byte[i] |= low; /* Set the low nibble */ in HexStringToByte()
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/
Dhks_ipc_serialization.c326 uint32_t byte = (a << (8 * 2)) + (b << (8 * 1)) + (c << (8 * 0)); in Base64Encode() local
329 outData[j++] = g_base64Table[(byte >> (6 * 3)) & 0b00111111]; /* 3 and 6 is offset */ in Base64Encode()
330 outData[j++] = g_base64Table[(byte >> (6 * 2)) & 0b00111111]; /* 2 and 6 is offset */ in Base64Encode()
331 outData[j++] = g_base64Table[(byte >> (6 * 1)) & 0b00111111]; /* 1 and 6 is offset */ in Base64Encode()
332 outData[j++] = g_base64Table[(byte >> (6 * 0)) & 0b00111111]; /* 0 and 6 is offset */ in Base64Encode()
/base/startup/hvb/libhvb/src/crypto/
Dhvb_rsa.c40 #define byte2bit(byte) ((byte) << 3) argument
Dhvb_rsa_verify.c40 #define byte2bit(byte) ((byte) << 3) argument
/base/update/updater/test/unittest/test_data/diffpatch/
DPatchGztest_old.gz1[==========] Running 25 tests from 7 test ...
DPatchGztest_new.gz
/base/hiviewdfx/hilog/frameworks/libhilog/vsnprintf/
Doutput_p.inl450 /* fill zero for normal char 128 byte for 0x80 - 0xff */