Home
last modified time | relevance | path

Searched refs:toByteArray (Results 1 – 25 of 528) sorted by relevance

12345678910>>...22

/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/kanon/
DAnonymousCountingTokensImpl.java44 byte[] schemeParametersInBytes = schemeParametersProto.toByteArray(); in generateClientParameters()
45 byte[] serverPublicParametersInBytes = serverPublicParametersProto.toByteArray(); in generateClientParameters()
63 byte[] messagesInBytes = messagesProto.toByteArray(); in generateTokensRequest()
64 byte[] schemeParametersInBytes = schemeParametersProto.toByteArray(); in generateTokensRequest()
65 byte[] clientPublicParametersInBytes = clientPublicParametersProto.toByteArray(); in generateTokensRequest()
66 byte[] clientPrivateParametersInBytes = clientPrivateParametersProto.toByteArray(); in generateTokensRequest()
67 byte[] serverPublicParametersInBytes = serverPublicParameters.toByteArray(); in generateTokensRequest()
92 byte[] messagesInBytes = messagesProto.toByteArray(); in verifyTokensResponse()
93 byte[] tokensRequestInBytes = tokensRequestProto.toByteArray(); in verifyTokensResponse()
94 byte[] tokensRequestPrivateStateInBytes = tokensRequestPrivateStateProto.toByteArray(); in verifyTokensResponse()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/jni/java/com/android/adservices/
DActJniUtility.java53 byte[] schemeParametersInBytes = schemeParametersProto.toByteArray(); in checkClientParameters()
54 byte[] clientPublicParametersInBytes = clientPublicParametersProto.toByteArray(); in checkClientParameters()
55 byte[] serverPublicParametersInBytes = serverPublicParametersProto.toByteArray(); in checkClientParameters()
56 byte[] serverPrivateParametersInBytes = serverPrivateParametersProto.toByteArray(); in checkClientParameters()
76 byte[] tokensRequestInBytes = tokensRequestProto.toByteArray(); in generateTokensResponse()
77 byte[] schemeParametersInBytes = schemeParametersProto.toByteArray(); in generateTokensResponse()
78 byte[] clientPublicParametersInBytes = clientPublicParametersProto.toByteArray(); in generateTokensResponse()
79 byte[] serverPublicParametersInBytes = serverPublicParametersProto.toByteArray(); in generateTokensResponse()
80 byte[] serverPrivateParametersInBytes = serverPrivateParametersProto.toByteArray(); in generateTokensResponse()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarNavigationManagerTest.java99 assertThat(ImageReference.parseFrom(imageReference.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
100 assertThat(Distance.parseFrom(distance.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
101 assertThat(Maneuver.parseFrom(maneuver.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
102 assertThat(Lane.parseFrom(lane.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
103 assertThat(LaneDirection.parseFrom(laneDirection.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
104 assertThat(Cue.parseFrom(cue.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
105 assertThat(CueElement.parseFrom(cueElement.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
106 assertThat(Step.parseFrom(step.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
107 assertThat(LatLng.parseFrom(latLng.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
108 assertThat(Destination.parseFrom(destination.toByteArray())).isNotNull(); in testSerializeAndDeserializeProto()
[all …]
/packages/modules/RemoteKeyProvisioning/app/tests/unit/src/com/android/rkpdapp/unittest/
DCborUtilsTest.java75 byte[] encoded = mBaos.toByteArray(); in encodeDataItem()
129 byte[] encodedBytes = mBaos.toByteArray(); in testParseSignedCertificatesFakeData()
143 assertNull(CborUtils.parseSignedCertificates(mBaos.toByteArray())); in testParseSignedCertificatesWrongSize()
157 assertNull(CborUtils.parseSignedCertificates(mBaos.toByteArray())); in testParseSignedCertificatesWrongTypeSharedCerts()
172 assertNull(CborUtils.parseSignedCertificates(mBaos.toByteArray())); in testParseSignedCertificatesWrongTypeUniqueCerts()
194 GeekResponse resp = CborUtils.parseGeekResponse(mBaos.toByteArray()); in testParseGeekResponseFakeData()
223 GeekResponse resp = CborUtils.parseGeekResponse(mBaos.toByteArray()); in testParseGeekResponseFakeDataWithBadCertTimeRange()
251 GeekResponse resp = CborUtils.parseGeekResponse(mBaos.toByteArray()); in testExtraDeviceConfigEntriesDontFail()
278 GeekResponse resp = CborUtils.parseGeekResponse(mBaos.toByteArray()); in testMissingDeviceConfigDoesntFail()
309 GeekResponse resp = CborUtils.parseGeekResponse(mBaos.toByteArray()); in testMissingDeviceConfigEntriesDoesntFail()
[all …]
DUtils.java101 final byte[] priv = privateKey.getS().toByteArray(); in getBytesFromP256PrivateKey()
120 final byte[] x = publicKey.getW().getAffineX().toByteArray(); in getBytesFromP256PublicKey()
131 final byte[] y = publicKey.getW().getAffineY().toByteArray(); in getBytesFromP256PublicKey()
237 return signer.sign(baos.toByteArray()); in encodeAndSignSigStructure()
242 return ecdsaSigner.sign(baos.toByteArray()); in encodeAndSignSigStructure()
256 return baos.toByteArray(); in encodeEd25519PubKey()
279 return baos.toByteArray(); in encodeP256PubKey()
296 return baos.toByteArray(); in encodeX25519PubKey()
306 return baos.toByteArray(); in encodeSimpleMap()
/packages/modules/Connectivity/staticlibs/framework/com/android/net/module/util/
DMacAddressUtils.java36 MacAddress.fromString("2:0:0:0:0:0").toByteArray());
38 MacAddress.fromString("1:0:0:0:0:0").toByteArray());
40 MacAddress.fromString("ff:ff:ff:0:0:0").toByteArray());
42 MacAddress.fromString("0:0:0:ff:ff:ff").toByteArray());
52 return (longAddrFromByteAddr(address.toByteArray()) & MULTICAST_MASK) != 0; in isMulticastAddress()
85 addr = (longAddrFromByteAddr(base.toByteArray()) & OUI_MASK) in createRandomUnicastAddress()
/packages/modules/GeoTZ/s2storage/src/test/java/com/android/storage/table/packed/
DIntValuePackedTableTest.java51 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeTooBig()
74 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_unsigned()
97 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_signed()
118 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in addEntry_outOfOrder()
141 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getSharedData()
157 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_unsignedValue()
176 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntryByIndex()
199 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_signedValue()
215 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_emptyTable()
230 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_badKey()
[all …]
DPackedTableReaderWriterTest.java88 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in headerFields()
111 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in entryGetValue_int()
136 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in entryGetValue_long()
162 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_unsigned()
186 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in valueSizeMax_signed()
207 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in addEntry_outOfOrder()
229 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getSharedData()
244 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_unsignedValue()
263 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_signedValue()
279 BlockData blockData = new BlockData(createByteBuffer(baos.toByteArray())); in getEntry_emptyTable()
[all …]
/packages/modules/AdServices/sdksandbox/tests/testutils/src/android/app/sdksandbox/testutils/
DProtoUtil.java57 contentProviderAllowlists.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeContentProviderAllowlist()
65 allowedContentProvidersBuilder.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeContentProviderAllowlist()
85 activityAllowlists.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeActivityAllowlist()
95 allowedActivitiesBuilder.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeActivityAllowlist()
118 broadcastReceiverAllowlist.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeBroadcastReceiverAllowlist()
126 allowedBroadcastReceivers.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeBroadcastReceiverAllowlist()
145 serviceAllowlists.toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeServiceAllowlist()
154 encodeAllowedServices(services).toByteArray(), Base64.NO_PADDING | Base64.NO_WRAP); in encodeServiceAllowlist()
/packages/modules/OnDevicePersonalization/tests/federatedcomputetests/src/com/android/federatedcompute/services/training/jni/
DJavaExampleStoreTest.java67 SELECTOR.toByteArray(), new byte[] {}); in testCreateExampleIterator_success()
70 assertThat(nativeIterator.next()).isEqualTo(data1.toByteArray()); in testCreateExampleIterator_success()
71 assertThat(nativeIterator.next()).isEqualTo(data2.toByteArray()); in testCreateExampleIterator_success()
86 SELECTOR.toByteArray(), new byte[] {}); in testCreateExampleIterator_interruptedIterator()
101 SELECTOR.toByteArray(), new byte[] {}); in testCreateExampleIterator_throwingIterator()
121 return this.mData.get(this.mNext++).toByteArray(); in next()
/packages/modules/Bluetooth/framework/java/android/bluetooth/le/
DTransportDiscoveryData.java107 return Arrays.equals(toByteArray(), other.toByteArray()); in equals()
113 return Arrays.hashCode(toByteArray()); in hashCode()
159 public byte[] toByteArray() { in toByteArray() method in TransportDiscoveryData
164 buffer.put(transportBlock.toByteArray()); in toByteArray()
175 return BluetoothLeUtils.toString(toByteArray()); in toString()
DTransportBlock.java97 return Arrays.equals(toByteArray(), other.toByteArray()); in equals()
103 return Arrays.hashCode(toByteArray()); in hashCode()
152 public byte[] toByteArray() { in toByteArray() method in TransportBlock
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/provider/
DChreDiscoveryProvider.java228 NANOAPP_ID, NANOAPP_MESSAGE_TYPE_FILTER, filters.toByteArray()); in sendFilters()
240 NANOAPP_ID, NANOAPP_MESSAGE_TYPE_CONFIG, config.toByteArray()); in sendScreenUpdate()
302 secretId = credential.getSecretId().toByteArray(); in onMessageFromNanoApp()
303 authenticityKey = credential.getAuthenticityKey().toByteArray(); in onMessageFromNanoApp()
304 publicKey = credential.getPublicKey().toByteArray(); in onMessageFromNanoApp()
305 encryptedMetaData = credential.getEncryptedMetadata().toByteArray(); in onMessageFromNanoApp()
307 credential.getEncryptedMetadataTag().toByteArray(); in onMessageFromNanoApp()
327 filterResult.getBluetoothAddress().toByteArray())); in onMessageFromNanoApp()
347 .substring(1, 1 + dataLength).toByteArray())); in onMessageFromNanoApp()
401 element.getValue().substring(0, endIndex).toByteArray())); in addDataElementsToPresenceDevice()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/gatt/
DAdvertiseHelper.java128 ret.write(serviceUuids16.toByteArray(), 0, serviceUuids16.size()); in advertiseDataToBytes()
135 ret.write(serviceUuids32.toByteArray(), 0, serviceUuids32.size()); in advertiseDataToBytes()
142 ret.write(serviceUuids128.toByteArray(), 0, serviceUuids128.size()); in advertiseDataToBytes()
202 ret.write(serviceUuids16.toByteArray(), 0, serviceUuids16.size()); in advertiseDataToBytes()
209 ret.write(serviceUuids32.toByteArray(), 0, serviceUuids32.size()); in advertiseDataToBytes()
216 ret.write(serviceUuids128.toByteArray(), 0, serviceUuids128.size()); in advertiseDataToBytes()
222 ret.write(transportDiscoveryData.toByteArray(), 0, transportDiscoveryData.totalBytes()); in advertiseDataToBytes()
224 return ret.toByteArray(); in advertiseDataToBytes()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcp/helpers/
DCoverArt.java75 private byte[] toByteArray(Bitmap bitmap) { in toByteArray() method in CoverArt
80 return buffer.toByteArray(); in toByteArray()
85 byte[] image = toByteArray(mImage); in getImageHash()
110 return outputStream.toByteArray(); in getImage()
125 return outputStream.toByteArray(); in getImage()
148 return outputStream.toByteArray(); in getThumbnail()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DIOUtils.java40 public static byte[] toByteArray(File file) throws IOException { in toByteArray() method in IOUtils
42 return toByteArray(in); in toByteArray()
46 public static byte[] toByteArray(InputStream in) throws IOException { in toByteArray() method in IOUtils
49 return out.toByteArray(); in toByteArray()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/util/
DCollectionUtilsTest.kt55 private val TEST_BYTE_ARRAY_1 = "I".toByteArray()
56 private val TEST_BYTE_ARRAY_2 = "love".toByteArray()
57 private val TEST_BYTE_ARRAY_3 = "Android".toByteArray()
58 private val TEST_BYTE_ARRAY_4 = "Hello".toByteArray()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/
DCarTelemetryServiceTest.java176 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V1.toByteArray(), in testAddMetricsConfig_newMetricsConfig_shouldSucceed()
186 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V1.toByteArray(), in testAddMetricsConfig_duplicateMetricsConfig_shouldFail()
192 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V1.toByteArray(), in testAddMetricsConfig_duplicateMetricsConfig_shouldFail()
215 mService.addMetricsConfig(noNameConfig.getName(), noNameConfig.toByteArray(), in testAddMetricsConfig_invalidMetricsConfigName_shouldFail()
225 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V2.toByteArray(), in testAddMetricsConfig_olderMetricsConfig_shouldFail()
231 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V1.toByteArray(), in testAddMetricsConfig_olderMetricsConfig_shouldFail()
241 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V1.toByteArray(), in testAddMetricsConfig_newerMetricsConfig_shouldReplaceAndDeleteOldResult()
245 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V2.toByteArray(), in testAddMetricsConfig_newerMetricsConfig_shouldReplaceAndDeleteOldResult()
260 mService.addMetricsConfig(wrongName, METRICS_CONFIG_V1.toByteArray(), in testAddMetricsConfig_invalidName_shouldFail()
270 mService.addMetricsConfig(METRICS_CONFIG_NAME, METRICS_CONFIG_V1.toByteArray(), in testRemoveMetricsConfig_shouldDeleteConfigAndResult()
[all …]
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hotspot2/anqp/
DOsuProviderInfoTestUtil.java69 return out.toByteArray(); in getTestData()
87 return out.toByteArray(); in getTestDataWithInvalidLength()
129 return out.toByteArray(); in getTestPayload()
139 return out.toByteArray(); in getI18NameListData()
154 return out.toByteArray(); in getI18NameData()
DANQPParserTest.java58 return stream.toByteArray(); in getVenueNamePayload()
75 return stream.toByteArray(); in getDomainNamePayload()
96 return stream.toByteArray(); in getRoamingConsortiumPayload()
114 return stream.toByteArray(); in getNAIRealmPayload()
132 return stream.toByteArray(); in getThreeGPPNetworkPayload()
155 return stream.toByteArray(); in getVendorSpecificPayload()
219 return stream.toByteArray(); in getHSConnectionCapabilityPayload()
235 return out.toByteArray(); in getHSOsuProvidersPayload()
261 return stream.toByteArray(); in getI18NameListPayload()
/packages/modules/OnDevicePersonalization/tests/frameworktests/src/com/android/ondevicepersonalization/internal/util/
DPersistableBundleUtilsTest.java40 assertNull(PersistableBundleUtils.toByteArray(null)); in testNullOrEmptyInput()
44 PersistableBundleUtils.toByteArray(PersistableBundle.EMPTY)) in testNullOrEmptyInput()
60 byte[] serialized = PersistableBundleUtils.toByteArray(bundle); in testRoundTrip()
82 byte[] serialized = PersistableBundleUtils.toByteArray(bundle); in testRoundTripLarge()
/packages/modules/CellBroadcastService/tests/src/com/android/cellbroadcastservice/tests/
DSmsHeaderTest.java90 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArray()
104 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArray16bits()
118 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testConvertToByteArrayLanguageTable()
125 SmsHeader convertedSmsHeader = SmsHeader.fromByteArray(SmsHeader.toByteArray(mSmsHeader)); in testHashCode()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/hal/
DWifiRttControllerAidlImplTest.java150 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequest()
160 equalTo(MacAddress.fromString("0A:0B:0C:0D:0E:00").toByteArray())); in testRangeRequest()
170 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequest()
219 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestWithLimitedCapabilities()
234 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilities()
280 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilitiesNoOverlap()
308 assertArrayEquals(mac1.toByteArray(), mMacAddressCaptor.getValue()[0].data); in testRangeCancel()
309 assertArrayEquals(mac2.toByteArray(), mMacAddressCaptor.getValue()[1].data); in testRangeCancel()
343 collector.checkThat("mac", rttResult.getMacAddress().toByteArray(), in testRangeResults()
344 equalTo(MacAddress.fromString("05:06:07:08:09:0A").toByteArray())); in testRangeResults()
DWifiRttControllerHidlImplTest.java131 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequest()
141 equalTo(MacAddress.fromString("0A:0B:0C:0D:0E:00").toByteArray())); in testRangeRequest()
151 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequest()
198 equalTo(MacAddress.fromString("00:01:02:03:04:00").toByteArray())); in testRangeRequestWithLimitedCapabilities()
210 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilities()
252 equalTo(MacAddress.fromString("08:09:08:07:06:05").toByteArray())); in testRangeRequestWithLimitedCapabilitiesNoOverlap()
278 assertArrayEquals(mac1.toByteArray(), (byte[]) mArrayListCaptor.getValue().get(0)); in testRangeCancel()
279 assertArrayEquals(mac2.toByteArray(), (byte[]) mArrayListCaptor.getValue().get(1)); in testRangeCancel()
317 collector.checkThat("mac", rttResult.getMacAddress().toByteArray(), in testRangeResults()
318 equalTo(MacAddress.fromString("05:06:07:08:09:0A").toByteArray())); in testRangeResults()
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/service/
DPermissionChangeStorageImplTest.kt99 val inStream = ByteArrayInputStream(outStream.toByteArray()) in serialize_dataCanBeParsed()
109 val inStream = ByteArrayInputStream(outStream.toByteArray()) in serialize_roundsTimeDownToDate()
127 val inStream = ByteArrayInputStream(outStream.toByteArray()) in serialize_exactTimeDataCanBeParsed()
145 val inStream = ByteArrayInputStream(outStream.toByteArray()) in serialize_afterStoresExactTimeChangedToTrue_canBeParsed()
173 val inStream = ByteArrayInputStream(outStream.toByteArray()) in serialize_afterStoresExactTimeChangedToFalse_roundsTimeDownToDate()

12345678910>>...22