Home
last modified time | relevance | path

Searched refs:hexString (Results 1 – 25 of 65) sorted by relevance

123

/aosp12/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/
H A DTestUtils.java33 public static byte[] hexStringToByteArray(String hexString) { in hexStringToByteArray() argument
34 int len = hexString.length(); in hexStringToByteArray()
42 ((Character.digit(hexString.charAt(i), 16) << 4) in hexStringToByteArray()
43 + Character.digit(hexString.charAt(i + 1), 16)); in hexStringToByteArray()
48 public static int hexStringToInt(String hexString) { in hexStringToInt() argument
49 if (hexString.length() > 8) { in hexStringToInt()
53 for (int i = hexString.length(); i < 8; i++) { in hexStringToInt()
54 hexString = "0" + hexString; in hexStringToInt()
57 return ByteBuffer.wrap(hexStringToByteArray(hexString)).getInt(); in hexStringToInt()
/aosp12/packages/modules/NetworkStack/tests/unit/src/android/net/netlink/
H A DNduseroptMessageTest.java162 final String hexString = HDR_16BYTE + "00000000000000000000000000000000" + NLA_SRCADDR; in testZeroLengthOption() local
163 ByteBuffer buf = toBuffer(hexString); in testZeroLengthOption()
175 ByteBuffer buf = toBuffer(hexString); in testTooLongOption()
185 String hexString = HDR_32BYTE + OPT_PREF64; in testOptionsTooLong() local
186 ByteBuffer buf = toBuffer(hexString); in testOptionsTooLong()
188 assertNull(NduseroptMessage.parse(toBuffer(hexString), NETLINK_ROUTE)); in testOptionsTooLong()
191 hexString = HDR_32BYTE + OPT_PREF64 + OPT_PREF64; in testOptionsTooLong()
192 buf = toBuffer(hexString); in testOptionsTooLong()
194 assertNull(NduseroptMessage.parse(toBuffer(hexString), NETLINK_ROUTE)); in testOptionsTooLong()
225 private ByteBuffer toBuffer(String hexString) { in toBuffer() argument
[all …]
/aosp12/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
H A DHex.java82 public static byte[] decodeHex(String hexString) { in decodeHex() argument
83 int length = hexString.length(); in decodeHex()
86 throw new IllegalArgumentException("Odd number of characters: " + hexString); in decodeHex()
92 int c1 = hexString.charAt(j++); in decodeHex()
104 int c2 = hexString.charAt(j++); in decodeHex()
120 throw new IllegalArgumentException("Invalid hexadecimal digit: " + hexString); in decodeHex()
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/uicc/
H A DUiccCarrierPrivilegeRulesTest.java123 final String hexString = in testParseRule_Normal() local
127 testHelper(hexString); in testParseRule_Normal()
155 testHelper(hexString); in testParseRule_With4FD0D1()
177 testHelper(hexString); in testParseRule_With4FD0()
204 final String hexString = in testParseRule_TwoMessages() local
209 testHelper(hexString); in testParseRule_TwoMessages()
242 testHelper(hexString); in testParseRule_InvalidRulesWith4F00()
264 testHelper(hexString); in testParseRule_InvalidRulesWithoutDB()
305 final String hexString = in testAID_OnlyARAM() local
365 final String hexString = in testAID_OnlyARAD() local
[all …]
/aosp12/frameworks/native/libs/binder/tests/parcel_fuzzer/
H A Dutil.cpp24 std::string hexString(const void* bytes, size_t len) { in hexString() function
39 std::string hexString(const std::vector<uint8_t>& bytes) { in hexString() function
40 return hexString(bytes.data(), bytes.size()); in hexString()
H A Dutil.h53 std::string hexString(const void* bytes, size_t len);
54 std::string hexString(const std::vector<uint8_t>& bytes);
H A Dhwbinder.cpp73 FUZZ_LOG() << "read status: " << status << " data: " << hexString(data.data(), data.size()); in __anon9fc9a9de0302()
79 FUZZ_LOG() << "read status: " << hexString(inplace, length); in __anon9fc9a9de0402()
103 FUZZ_LOG() << "readString16Inplace: " << hexString(str, sizeof(char16_t) * outSize); in __anon9fc9a9de0602()
/aosp12/frameworks/native/libs/gralloc/types/fuzzer/
H A Dutil.cpp24 std::string hexString(const void* bytes, size_t len) { in hexString() function
39 std::string hexString(const std::vector<uint8_t>& bytes) { in hexString() function
40 return hexString(bytes.data(), bytes.size()); in hexString()
H A Dutil.h52 std::string hexString(const void* bytes, size_t len);
53 std::string hexString(const std::vector<uint8_t>& bytes);
/aosp12/packages/modules/GeoTZ/s2storage/tools/src/java/com/android/timezone/location/tools/dump/
H A DDumpUtils.java68 String hexString = Integer.toHexString(value); in zeroPadHex() local
69 int unpaddedLength = hexString.length(); in zeroPadHex()
71 return hexString; in zeroPadHex()
73 return zeroPad(length, hexString); in zeroPadHex()
/aosp12/packages/modules/Wifi/framework/java/android/net/wifi/p2p/
H A DWifiP2pDevice.java431 private int parseHex(String hexString) { in parseHex() argument
433 if (hexString.startsWith("0x") || hexString.startsWith("0X")) { in parseHex()
434 hexString = hexString.substring(2); in parseHex()
438 num = Integer.parseInt(hexString, 16); in parseHex()
440 Log.e(TAG, "Failed to parse hex string " + hexString); in parseHex()
/aosp12/frameworks/libs/net/common/device/com/android/net/module/util/
H A DHexDump.java211 public static byte[] hexStringToByteArray(String hexString) { in hexStringToByteArray() argument
212 int length = hexString.length(); in hexStringToByteArray()
217 (byte) ((toByte(hexString.charAt(i)) << 4) | toByte(hexString.charAt(i + 1))); in hexStringToByteArray()
/aosp12/frameworks/base/core/java/com/android/internal/util/
H A DHexDump.java173 public static byte[] hexStringToByteArray(String hexString) in hexStringToByteArray() argument
175 int length = hexString.length(); in hexStringToByteArray()
180 … buffer[i / 2] = (byte)((toByte(hexString.charAt(i)) << 4) | toByte(hexString.charAt(i+1))); in hexStringToByteArray()
/aosp12/packages/apps/CertInstaller/src/com/android/certinstaller/
H A DUtil.java71 StringBuilder hexString = new StringBuilder(); in toHexString() local
73 hexString.append(Integer.toHexString(0xFF & b)).append(separator); in toHexString()
75 return hexString.toString(); in toHexString()
/aosp12/packages/modules/IPsec/src/java/com/android/internal/net/utils/
H A DBigIntegerUtils.java29 public static BigInteger unsignedHexStringToBigInteger(String hexString) { in unsignedHexStringToBigInteger() argument
30 return new BigInteger(hexString, 16); in unsignedHexStringToBigInteger()
/aosp12/hardware/st/secure_element/ese-spi-driver/utils-lib/
H A DUtils.cc38 int Utils_charArrayToHexString(char* array, int length, char* hexString) { in Utils_charArrayToHexString() argument
39 char* ptr = hexString; in Utils_charArrayToHexString()
/aosp12/system/tools/hidl/hashing/include/hidl-hash/
H A DHash.h38 static std::string hexString(const std::vector<uint8_t>& hash);
39 std::string hexString() const;
/aosp12/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DHexDumpTest.java72 String hexString = "0123456789ABCDEF72f9a3438934c378d34f32a8b932"; in testRoundTrip_fromString() local
73 for (int length = 0; length < hexString.length(); length += 2) { in testRoundTrip_fromString()
74 String original = hexString.substring(0, length); in testRoundTrip_fromString()
/aosp12/packages/services/BuiltInPrintService/src/com/android/bips/ipp/
H A DCertificateStore.java172 private static byte[] hexToBytes(String hexString) { in hexToBytes() argument
173 if (hexString == null) { in hexToBytes()
177 char[] source = hexString.toCharArray(); in hexToBytes()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/avrcp/helpers/
H A DCoverArt.java101 StringBuffer hexString = new StringBuffer(); in getImageHash() local
103 hexString.append(Integer.toHexString(0xFF & messageDigest[i])); in getImageHash()
105 hash = hexString.toString(); in getImageHash()
/aosp12/frameworks/opt/telephony/src/java/com/android/internal/telephony/uicc/
H A DIccIoResult.java194 public IccIoResult(int sw1, int sw2, String hexString) { in IccIoResult() argument
195 this(sw1, sw2, IccUtils.hexStringToBytes(hexString)); in IccIoResult()
/aosp12/system/tools/hidl/hashing/
H A DHash.cpp68 std::string Hash::hexString(const std::vector<uint8_t>& hash) { in hexString() function in android::Hash
77 std::string Hash::hexString() const { in hexString() function in android::Hash
78 return hexString(mHash); in hexString()
/aosp12/packages/modules/IPsec/src/java/com/android/internal/net/eap/message/mschapv2/
H A DEapMsChapV2TypeData.java446 static byte[] hexStringToByteArray(String hexString) in hexStringToByteArray() argument
448 if (hexString.length() % 2 != 0) { in hexStringToByteArray()
453 byte[] dataBytes = new byte[hexString.length() / 2]; in hexStringToByteArray()
454 for (int i = 0; i < hexString.length(); i += 2) { in hexStringToByteArray()
455 dataBytes[i / 2] = (byte) Integer.parseInt(hexString.substring(i, i + 2), 16); in hexStringToByteArray()
/aosp12/frameworks/native/libs/binder/tests/
H A DbinderClearBufTest.cpp33 std::string hexString(const void* bytes, size_t len) { in hexString() function
86 *outBuffer = hexString(lastReply, lastReplySize); in RepeatString()
/aosp12/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/
H A DStringUtils.java571 public static byte[] hexStringToByteArray(@Nullable final String hexString) { in hexStringToByteArray() argument
572 if (isEmpty(hexString)) { in hexStringToByteArray()
575 final int N = hexString.length(); in hexStringToByteArray()
582 bytes[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4) in hexStringToByteArray()
583 + Character.digit(hexString.charAt(i + 1), 16)); in hexStringToByteArray()

123