/packages/modules/IPsec/tests/iketests/src/java/com/android/internal/net/ |
D | TestUtils.java | 33 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()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/ |
D | Hex.java | 82 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()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/netlink/ |
D | NduseroptMessageTest.java | 201 final String hexString = HDR_16BYTE + "00000000000000000000000000000000" + NLA_SRCADDR; in testZeroLengthOption() local 202 ByteBuffer buf = toBuffer(hexString); in testZeroLengthOption() 213 final String hexString = HDR_16BYTE + "26030000000000000000000000000000" + NLA_SRCADDR; in testTooLongOption() local 214 ByteBuffer buf = toBuffer(hexString); in testTooLongOption() 224 String hexString = HDR_32BYTE + OPT_PREF64; in testOptionsTooLong() local 225 ByteBuffer buf = toBuffer(hexString); in testOptionsTooLong() 227 assertNull(NduseroptMessage.parse(toBuffer(hexString), NETLINK_ROUTE)); in testOptionsTooLong() 230 hexString = HDR_32BYTE + OPT_PREF64 + OPT_PREF64; in testOptionsTooLong() 231 buf = toBuffer(hexString); in testOptionsTooLong() 233 assertNull(NduseroptMessage.parse(toBuffer(hexString), NETLINK_ROUTE)); in testOptionsTooLong() [all …]
|
D | RtNetlinkLinkMessageTest.java | 58 private ByteBuffer toByteBuffer(final String hexString) { in toByteBuffer() argument 59 return ByteBuffer.wrap(HexDump.hexStringToByteArray(hexString)); in toByteBuffer()
|
D | RtNetlinkAddressMessageTest.java | 66 private ByteBuffer toByteBuffer(final String hexString) { in toByteBuffer() argument 67 return ByteBuffer.wrap(HexDump.hexStringToByteArray(hexString)); in toByteBuffer()
|
D | RtNetlinkRouteMessageTest.java | 65 private ByteBuffer toByteBuffer(final String hexString) { in toByteBuffer() argument 66 return ByteBuffer.wrap(HexDump.hexStringToByteArray(hexString)); in toByteBuffer()
|
/packages/modules/GeoTZ/tzs2storage/tools/src/java/com/android/storage/tools/block/dump/ |
D | DumpUtils.java | 84 String hexString = Integer.toHexString(value); in zeroPadHex() local 85 int unpaddedLength = hexString.length(); in zeroPadHex() 87 return hexString; in zeroPadHex() 89 return zeroPad(length, hexString); in zeroPadHex()
|
/packages/modules/GeoTZ/s2storage/tools/src/java/com/android/storage/tools/block/dump/ |
D | DumpUtils.java | 84 String hexString = Integer.toHexString(value); in zeroPadHex() local 85 int unpaddedLength = hexString.length(); in zeroPadHex() 87 return hexString; in zeroPadHex() 89 return zeroPad(length, hexString); in zeroPadHex()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/signals/ |
D | SignalsScriptEngine.java | 171 private byte[] decodeHexString(String hexString) { in decodeHexString() argument 173 hexString.length() % 2 == 0, "Expected an hex string but the arg length is odd"); in decodeHexString() 175 byte[] result = new byte[hexString.length() / 2]; in decodeHexString() 176 for (int i = 0; i < hexString.length() / 2; i++) { in decodeHexString() 177 result[i] = byteValue(hexString.charAt(2 * i), hexString.charAt(2 * i + 1)); in decodeHexString()
|
/packages/modules/Uwb/service/tests/src/com/android/server/uwb/util/ |
D | DataTypeConversionUtilTest.java | 101 String hexString = "010203040A0B0C0D"; in byteArrayToHexString_byteString_success() local 105 .isEqualTo(hexString); in byteArrayToHexString_byteString_success() 115 String hexString = "010203040A0B0C0D"; in hexStringToByteArray_success() local 116 assertThat(DataTypeConversionUtil.hexStringToByteArray(hexString)) in hexStringToByteArray_success()
|
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/ |
D | HexDump.java | 213 public static byte[] hexStringToByteArray(String hexString) { in hexStringToByteArray() argument 214 int length = hexString.length(); in hexStringToByteArray() 219 (byte) ((toByte(hexString.charAt(i)) << 4) | toByte(hexString.charAt(i + 1))); in hexStringToByteArray()
|
/packages/modules/Wifi/framework/java/android/net/wifi/p2p/ |
D | WifiP2pDevice.java | 604 private int parseHex(String hexString) { in parseHex() argument 606 if (hexString.startsWith("0x") || hexString.startsWith("0X")) { in parseHex() 607 hexString = hexString.substring(2); in parseHex() 611 num = Integer.parseInt(hexString, 16); in parseHex() 613 Log.e(TAG, "Failed to parse hex string " + hexString); in parseHex()
|
/packages/apps/CertInstaller/src/com/android/certinstaller/ |
D | Util.java | 71 StringBuilder hexString = new StringBuilder(); in toHexString() local 73 hexString.append(Integer.toHexString(0xFF & b)).append(separator); in toHexString() 75 return hexString.toString(); in toHexString()
|
/packages/modules/IPsec/src/java/com/android/internal/net/utils/ |
D | BigIntegerUtils.java | 29 public static BigInteger unsignedHexStringToBigInteger(String hexString) { in unsignedHexStringToBigInteger() argument 30 return new BigInteger(hexString, 16); in unsignedHexStringToBigInteger()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcp/helpers/ |
D | CoverArt.java | 93 StringBuffer hexString = new StringBuffer(); in getImageHash() local 95 hexString.append(Integer.toHexString(0xFF & messageDigest[i])); in getImageHash() 97 hash = hexString.toString(); in getImageHash()
|
/packages/services/BuiltInPrintService/src/com/android/bips/ipp/ |
D | CertificateStore.java | 172 private static byte[] hexToBytes(String hexString) { in hexToBytes() argument 173 if (hexString == null) { in hexToBytes() 177 char[] source = hexString.toCharArray(); in hexToBytes()
|
/packages/modules/IPsec/src/java/com/android/internal/net/eap/message/mschapv2/ |
D | EapMsChapV2TypeData.java | 446 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()
|
/packages/inputmethods/LatinIME/common/src/com/android/inputmethod/latin/common/ |
D | StringUtils.java | 571 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()
|
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/btservice/ |
D | MetricsLogger.java | 425 StringBuilder hexString = new StringBuilder(); in getSha256String() local 428 hexString.append(String.format("%02x", b)); in getSha256String() 430 return hexString.toString(); in getSha256String()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/ |
D | Trigger.java | 410 String hexString = triggerDatum.getString("key_piece").substring(2); in parseAggregateTrigger() local 411 BigInteger bigInteger = new BigInteger(hexString, 16); in parseAggregateTrigger() 554 String hexString = jsonObject.getString(key).substring(2); in parseAdtechKeyMapping() local 555 BigInteger bigInteger = new BigInteger(hexString, 16); in parseAdtechKeyMapping()
|
D | Source.java | 969 String hexString = jsonObject.getString(key).substring(2); in getAggregatableAttributionSource() local 970 BigInteger bigInteger = new BigInteger(hexString, 16); in getAggregatableAttributionSource() 993 String hexString = jsonObject.getString(key).substring(2); in getAggregatableAttributionSourceV2() local 994 BigInteger bigInteger = new BigInteger(hexString, 16); in getAggregatableAttributionSourceV2()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | UtilsTest.java | 111 String hexString = "abcd"; in testHexToBytes() local 113 byte[] result = Utils.hexToBytes(hexString); in testHexToBytes()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | StructTest.java | 85 private <T> T doParsingMessageTest(final String hexString, final Class<T> clazz, in doParsingMessageTest() argument 87 final ByteBuffer buf = toByteBuffer(hexString); in doParsingMessageTest() 679 private ByteBuffer toByteBuffer(final String hexString) { in toByteBuffer() argument 680 return ByteBuffer.wrap(HexDump.hexStringToByteArray(hexString)); in toByteBuffer() 740 final String hexString = ByteOrder.nativeOrder().equals(ByteOrder.LITTLE_ENDIAN) in testStructToByteArray() local 742 assertArrayEquals(toByteBuffer(hexString).array(), msg.writeToBytes()); in testStructToByteArray()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/attribution/ |
D | XnaSourceCreator.java | 248 String hexString = baseAggregatableSource.get(key).toString(16); 249 derivedAggregatableSource.put(key, HEX_PREFIX + hexString);
|
/packages/apps/CellBroadcastReceiver/tests/compliancetests/src/com/android/cellbroadcastreceiver/compliancetests/ |
D | CellBroadcastUiTest.java | 212 String hexString = serialHexString + hexChannel + pduCode + "11D4F29C0E0AB2CB727A08"; in receiveBroadcastMessage() local 213 byte[] data = HexDump.hexStringToByteArray(hexString); in receiveBroadcastMessage()
|