Home
last modified time | relevance | path

Searched refs:ByteString (Results 1 – 25 of 45) sorted by relevance

12

/packages/modules/Connectivity/nearby/tests/multidevices/clients/test_support/fastpair_provider/src/android/nearby/fastpair/provider/crypto/
DCrypto.java25 import com.google.protobuf.ByteString;
41 public static ByteString aesEcbNoPaddingEncrypt(ByteString key, ByteString data) { in aesEcbNoPaddingEncrypt()
46 public static ByteString aesEcbNoPaddingDecrypt(ByteString key, ByteString data) { in aesEcbNoPaddingDecrypt()
51 private static ByteString aesEcbOperation(ByteString key, ByteString data, int operation) { in aesEcbOperation()
61 return ByteString.copyFrom(output); in aesEcbOperation()
DE2eeCalculator.java23 import com.google.protobuf.ByteString;
60 public static ByteString computeE2eeEid( in computeE2eeEid()
61 ByteString identityKey, int exponent, int deviceClockSeconds) { in computeE2eeEid()
65 private static ByteString computePublicKey(BigInteger privateKey) { in computePublicKey()
70 ByteString identityKey, int exponent, int deviceClockSeconds) { in computePrivateKey()
87 Crypto.aesEcbNoPaddingEncrypt(identityKey, ByteString.copyFrom(data)).toByteArray(); in computePrivateKey()
95 private static ByteString getXCoordinateBytes(ECPoint point) { in getXCoordinateBytes()
117 return ByteString.copyFrom(bytes); in getXCoordinateBytes()
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/common/bluetooth/fastpair/
DFastPairHistoryItem.java22 import com.google.protobuf.ByteString;
34 private final ByteString mAccountKey;
35 private final ByteString mSha256AccountKeyPublicAddress;
37 FastPairHistoryItem(ByteString accountkey, ByteString sha256AccountKeyPublicAddress) { in FastPairHistoryItem()
49 ByteString accountKey, ByteString sha256AccountKeyPublicAddress) { in create()
53 ByteString accountKey() { in accountKey()
57 ByteString sha256AccountKeyPublicAddress() { in sha256AccountKeyPublicAddress()
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/fastpair/footprint/
DFastPairUploadInfo.java20 import com.google.protobuf.ByteString;
31 private ByteString mAccountKey;
33 private ByteString mSha256AccountKeyPublicAddress;
36 public FastPairUploadInfo(Cache.StoredDiscoveryItem storedDiscoveryItem, ByteString accountKey, in FastPairUploadInfo()
37 ByteString sha256AccountKeyPublicAddress) { in FastPairUploadInfo()
47 public ByteString getAccountKey() { in getAccountKey()
52 public ByteString getSha256AccountKeyPublicAddress() { in getSha256AccountKeyPublicAddress()
/packages/modules/Connectivity/nearby/tests/multidevices/clients/test_support/fastpair_provider/src/android/nearby/fastpair/provider/
DFastPairSimulatorDatabase.java30 import com.google.protobuf.ByteString;
60 Set<ByteString> accountKeys = new HashSet<>(getAccountKeys()); in addAccountKey()
62 Set<ByteString> removedKeys = new HashSet<>(); in addAccountKey()
64 for (ByteString key : accountKeys) { in addAccountKey()
75 accountKeys.add(ByteString.copyFrom(accountKey)); in addAccountKey()
80 public void setAccountKeys(Set<ByteString> accountKeys) { in setAccountKeys()
86 for (ByteString item : accountKeys) { in setAccountKeys()
94 public Set<ByteString> getAccountKeys() { in getAccountKeys()
100 Set<ByteString> accountKeys = new HashSet<>(); in getAccountKeys()
103 accountKeys.add(ByteString.copyFrom(base16().decode(key))); in getAccountKeys()
DFastPairSimulator.java113 import com.google.protobuf.ByteString;
632 private final ByteString mEddystoneIdentityKey;
650 @Nullable ByteString eddystoneIdentityKey) { in Options()
734 public ByteString getEddystoneIdentityKey() { in getEddystoneIdentityKey()
804 private ByteString mEddystoneIdentityKey;
928 public Builder setEddystoneIdentityKey(@Nullable ByteString eddystoneIdentityKey) { in setEddystoneIdentityKey()
1289 for (ByteString accountKey : getAccountKeys()) { in sendSetBufferActionResponse()
1500 for (ByteString key : getAccountKeys()) { in startGattServer()
1720 private ByteString mIdentityKey = mOptions.getEddystoneIdentityKey(); in startGattServer()
1801 ByteString accountKey = getOwnerAccountKey(); in startGattServer()
[all …]
/packages/apps/Dialer/java/com/android/voicemail/impl/transcribe/
DTranscriptionUtils.java26 import com.google.protobuf.ByteString;
36 static ByteString getAudioData(Context context, Uri voicemailUri) { in getAudioData()
38 return ByteString.readFrom(in); in getAudioData()
44 static AudioFormat getAudioFormat(ByteString audioData) { in getAudioFormat()
45 return audioData != null && audioData.startsWith(ByteString.copyFromUtf8(AMR_PREFIX)) in getAudioFormat()
51 static String getFingerprintFor(ByteString data, @Nullable String salt) { in getFingerprintFor()
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/provider/
DChreDiscoveryProviderTest.java29 import com.google.protobuf.ByteString;
76 .setSecretId(ByteString.copyFrom(new byte[] {1})) in testOnNearbyDeviceDiscovered()
77 .setAuthenticityKey(ByteString.copyFrom(new byte[2])) in testOnNearbyDeviceDiscovered()
78 .setPublicKey(ByteString.copyFrom(new byte[3])) in testOnNearbyDeviceDiscovered()
79 .setEncryptedMetadata(ByteString.copyFrom(new byte[4])) in testOnNearbyDeviceDiscovered()
80 .setEncryptedMetadataTag(ByteString.copyFrom(new byte[5])) in testOnNearbyDeviceDiscovered()
DUtilsTest.java32 import com.google.protobuf.ByteString;
295 ByteString.copyFrom(ACCOUNT_KEY), in genHappyPathFastPairUploadInfo()
296 ByteString.copyFrom(SHA256_ACCOUNT_KEY_PUBLIC_ADDRESS)); in genHappyPathFastPairUploadInfo()
478 ByteString.copyFrom(AUTHENTICATION_PUBLIC_KEY_SEC_P256R1)); in genHappyPathStoredDiscoveryItem()
485 storedDiscoveryItemBuilder.setIconPng(ByteString.copyFrom(ICON_PNG)); in genHappyPathStoredDiscoveryItem()
529 storedDiscoveryItemBuilder.setIconPng(ByteString.copyFrom(ICON_PNG)); in genHappyPathStoredDiscoveryItem()
539 fpDeviceBuilder.setAccountKey(ByteString.copyFrom(ACCOUNT_KEY)); in genHappyPathFastPairDeviceWithAccountKey()
541 ByteString.copyFrom(SHA256_ACCOUNT_KEY_PUBLIC_ADDRESS)); in genHappyPathFastPairDeviceWithAccountKey()
576 .setPublicKey(ByteString.copyFrom(ANTI_SPOOFING_KEY)) in genHappyPathObservedDeviceResponse()
593 .setImage(ByteString.copyFrom(IMAGE)) in genHappyPathObservedDeviceResponse()
/packages/modules/Bluetooth/android/pandora/server/src/com/android/pandora/
DGattInstance.kt29 import com.google.protobuf.ByteString
54 var value: ByteString?,
73 fun get(address: ByteString): GattInstance { in get()
113 gattInstanceValueRead.value = ByteString.copyFrom(value) in onCharacteristicRead()
132 gattInstanceValueRead.value = ByteString.copyFrom(value) in onDescriptorRead()
235 ByteString.EMPTY, in readCharacteristicBlocking()
264 ByteString.EMPTY, in readCharacteristicUuidBlocking()
287 GattInstanceValueRead(uuid, startHandle, ByteString.EMPTY, AttStatusCode.UNKNOWN_ERROR) in readCharacteristicUuidBlocking()
303 ByteString.EMPTY, in readDescriptorBlocking()
DUtils.kt33 import com.google.protobuf.ByteString in <lambda>()
295 fun ByteString.decodeAsMacAddressToString(): String = in Intent() method
298 fun ByteString.toBluetoothDevice(adapter: BluetoothAdapter): BluetoothDevice = in Intent() method
311 ByteString.copyFrom(MacAddress.fromString(this.address).toByteArray())!! in Intent()
316 .setAddress(ByteString.copyFrom(MacAddress.fromString(this.address).toByteArray())) in Intent()
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/common/bluetooth/fastpair/
DFastPairHistoryItemTest.java30 import com.google.protobuf.ByteString;
53 .create(ByteString.copyFrom(accountKey), ByteString.copyFrom(hashValue)); in inputMatchedPublicAddress_isMatchedReturnTrue()
69 .create(ByteString.copyFrom(accountKey), ByteString.copyFrom(hashValue)); in inputNotMatchedPublicAddress_isMatchedReturnFalse()
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/fastpair/cache/
DFastPairCacheManagerTest.java28 import com.google.protobuf.ByteString;
43 private static final ByteString ACCOUNT_KEY = ByteString.copyFromUtf8("axgs");
45 private static final ByteString ACCOUNT_KEY_B = ByteString.copyFromUtf8("axgb");
/packages/modules/Connectivity/nearby/tests/unit/src/com/android/server/nearby/util/
DDataUtilsTest.java22 import com.google.protobuf.ByteString;
72 assertThat(item.getIconPng()).isEqualTo(ByteString.copyFrom(DEVICE_IMAGE)); in test_toScanFastPairStoreItem_withAccount()
75 .isEqualTo(ByteString.copyFrom(DEVICE_PUBLIC_KEY)); in test_toScanFastPairStoreItem_withAccount()
134 ByteString.copyFrom(DEVICE_PUBLIC_KEY))) in createObservedDeviceResponse()
145 .setImage(ByteString.copyFrom(DEVICE_IMAGE)) in createObservedDeviceResponse()
/packages/services/Car/service/src/com/android/car/telemetry/util/
DMetricsReportProtoUtils.java28 import com.google.protobuf.ByteString;
58 public static ByteString getByteString(PersistableBundle bundle) { in getByteString()
60 return bytes == null ? null : ByteString.copyFrom(bytes); in getByteString()
67 public static PersistableBundle getBundle(ByteString byteString) { in getBundle()
/packages/modules/Connectivity/nearby/tests/multidevices/clients/test_support/fastpair_provider/simulator_app/src/android/nearby/fastpair/provider/simulator/testing/
DLocalFileStreamIOHandler.java27 import com.google.protobuf.ByteString;
73 public ByteString read() throws IOException { in read()
92 return ByteString.copyFrom(base16().decode(new String(data))); in read()
101 public void write(ByteString output) throws IOException { in write()
DStreamIOHandler.java19 import com.google.protobuf.ByteString;
34 ByteString read() throws IOException; in read()
42 void write(ByteString output) throws IOException; in write()
DRemoteDevicesManager.java28 import com.google.protobuf.ByteString;
97 String id, ByteString data, FutureCallback<Void> callback) { in writeDataToRemoteDevice()
116 ByteString data; in startListeningInputStreamTask()
DInputStreamListener.java19 import com.google.protobuf.ByteString;
25 void onInputData(ByteString byteString); in onInputData()
/packages/modules/Connectivity/nearby/service/java/com/android/server/nearby/provider/
DUtils.java29 import com.google.protobuf.ByteString;
60 ByteString.copyFrom(metadataParcel.deviceAccountKey)); in convertToFastPairDevicesWithAccountKey()
64 ByteString.copyFrom(metadataParcel.sha256DeviceAccountKeyPublicAddress)); in convertToFastPairDevicesWithAccountKey()
84 ByteString.copyFrom( in convertToFastPairDevicesWithAccountKey()
107 ByteString.copyFrom(metadataParcel.discoveryItem.iconPng)); in convertToFastPairDevicesWithAccountKey()
229 .setPublicKey(ByteString.copyFrom(metadata.antispoofPublicKey)) in convertToDevice()
266 private static @Nullable ByteString convertToImage( in convertToImage()
272 return ByteString.copyFrom(metadata.deviceMetadata.image); in convertToImage()
356 ByteString image = convertToImage(metadata); in convertToGetObservedDeviceResponse()
/packages/apps/RemoteProvisioner/tests/unittests/src/com/android/remoteprovisioner/unittest/
DSystemInterfaceTest.java76 import co.nstant.in.cbor.model.ByteString;
186 bais = new ByteArrayInputStream(((ByteString) macMsg.getDataItems().get(2)).getBytes()); in testGenerateCSRProvisionAndUseKey()
197 byte[] xPub = ((ByteString) publicKey.get(new NegativeInteger(-2))).getBytes(); in testGenerateCSRProvisionAndUseKey()
198 byte[] yPub = ((ByteString) publicKey.get(new NegativeInteger(-3))).getBytes(); in testGenerateCSRProvisionAndUseKey()
245 return ((ByteString) recipientKeyMap.get(new NegativeInteger(-2))).getBytes(); in extractRecipientKey()
306 byte[] protectedHeaders = ((ByteString) encMsg.get(0)).getBytes(); in testDecryptProtectedPayload()
308 byte[] encryptedContent = ((ByteString) encMsg.get(2)).getBytes(); in testDecryptProtectedPayload()
311 byte[] iv = ((ByteString) unprotectedHeaders.get(new UnsignedInteger(5))).getBytes(); in testDecryptProtectedPayload()
DCborUtilsTest.java36 import co.nstant.in.cbor.model.ByteString;
80 mGeekChain1.add(new ByteString(new byte[] {0x01, 0x02, 0x03})) in setUp()
81 .add(new ByteString(new byte[] {0x04, 0x05, 0x06})) in setUp()
82 .add(new ByteString(new byte[] {0x07, 0x08, 0x09})); in setUp()
86 mGeekChain2.add(new ByteString(new byte[] {0x09, 0x08, 0x07})) in setUp()
87 .add(new ByteString(new byte[] {0x06, 0x05, 0x04})) in setUp()
88 .add(new ByteString(new byte[] {0x03, 0x02, 0x01})); in setUp()
293 .add(new ByteString(CHALLENGE)) // Must be an array of bstrs in testParseGeekResponseFailsOnWrongType()
/packages/modules/Connectivity/nearby/tests/multidevices/clients/test_support/fastpair_provider/simulator_app/src/android/nearby/fastpair/provider/simulator/app/
DRemoteDeviceListener.java34 import com.google.protobuf.ByteString;
50 public void onInputData(ByteString byteString) { in onInputData()
84 ByteString accountKey = mMainActivity.getAccontKey(); in onInputData()
/packages/apps/RemoteProvisioner/src/com/android/remoteprovisioner/
DCborUtils.java35 import co.nstant.in.cbor.model.ByteString;
106 ((ByteString) dataItems.get(SHARED_CERTIFICATES_INDEX)).getBytes(); in parseSignedCertificates()
115 concat.write(((ByteString) entry).getBytes()); in parseSignedCertificates()
225 resp.setChallenge(((ByteString) respItems.get(CHALLENGE_INDEX)).getBytes()); in parseGeekResponse()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/util/
DMetricsReportProtoUtilsTest.java25 import com.google.protobuf.ByteString;
40 PersistableBundle bundle = MetricsReportProtoUtils.getBundle(ByteString.copyFrom(bytes)); in testConversion()

12