/frameworks/base/tests/net/java/android/net/ |
D | MacAddressTest.java | 89 String mac = pair[0]; in testToOuiString() local 91 assertEquals(expected, MacAddress.fromString(mac).toOuiString()); in testToOuiString() 104 for (String mac : macs) { in testHexPaddingWhenPrinting() 105 assertEquals(mac, MacAddress.fromString(mac).toString()); in testHexPaddingWhenPrinting() 106 assertEquals(mac, in testHexPaddingWhenPrinting() 107 MacAddress.stringAddrFromByteAddr(MacAddress.byteAddrFromStringAddr(mac))); in testHexPaddingWhenPrinting() 125 for (MacAddress mac : multicastAddresses) { in testIsMulticastAddress() 126 String msg = mac.toString() + " expected to be a multicast address"; in testIsMulticastAddress() 127 assertTrue(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress() 129 for (MacAddress mac : unicastAddresses) { in testIsMulticastAddress() [all …]
|
/frameworks/libs/net/common/tests/unit/src/android/net/util/ |
D | MacAddressUtilsTest.java | 52 for (MacAddress mac : multicastAddresses) { in testIsMulticastAddress() 53 String msg = mac.toString() + " expected to be a multicast address"; in testIsMulticastAddress() 54 assertTrue(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress() 56 for (MacAddress mac : unicastAddresses) { in testIsMulticastAddress() 57 String msg = mac.toString() + " expected not to be a multicast address"; in testIsMulticastAddress() 58 assertFalse(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress() 67 MacAddress mac = MacAddressUtils.createRandomUnicastAddress(); in testMacAddressRandomGeneration() local 68 String stringRepr = mac.toString(); in testMacAddressRandomGeneration() 71 mac.isLocallyAssigned()); in testMacAddressRandomGeneration() 72 assertEquals(MacAddress.TYPE_UNICAST, mac.getAddressType()); in testMacAddressRandomGeneration() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/pm/ |
D | MacAuthenticatedInputStreamTest.java | 73 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_Success() local 74 mac.init(HMAC_KEY_1); in testString1Authenticate_Success() 76 MacAuthenticatedInputStream is = new MacAuthenticatedInputStream(mTestStream1, mac); in testString1Authenticate_Success() 84 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_WrongTag_Failure() local 85 mac.init(HMAC_KEY_1); in testString1Authenticate_WrongTag_Failure() 87 MacAuthenticatedInputStream is = new MacAuthenticatedInputStream(mTestStream1, mac); in testString1Authenticate_WrongTag_Failure() 95 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_NullTag_Failure() local 96 mac.init(HMAC_KEY_1); in testString1Authenticate_NullTag_Failure() 98 MacAuthenticatedInputStream is = new MacAuthenticatedInputStream(mTestStream1, mac); in testString1Authenticate_NullTag_Failure() 106 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_ReadSingleByte_Success() local [all …]
|
/frameworks/base/identity/java/android/security/identity/ |
D | Util.java | 96 Mac mac = null; in computeHkdf() local 98 mac = Mac.getInstance(macAlgorithm); in computeHkdf() 102 if (size > 255 * mac.getMacLength()) { in computeHkdf() 110 mac.init(new SecretKeySpec(new byte[mac.getMacLength()], macAlgorithm)); in computeHkdf() 112 mac.init(new SecretKeySpec(salt, macAlgorithm)); in computeHkdf() 114 byte[] prk = mac.doFinal(ikm); in computeHkdf() 118 mac.init(new SecretKeySpec(prk, macAlgorithm)); in computeHkdf() 121 mac.update(digest); in computeHkdf() 122 mac.update(info); in computeHkdf() 123 mac.update((byte) ctr); in computeHkdf() [all …]
|
D | CredstoreIdentityCredential.java | 329 byte[] mac = resultParcel.mac; in getEntries() 330 if (mac != null && mac.length == 0) { in getEntries() 331 mac = null; in getEntries() 334 resultParcel.staticAuthenticationData, resultParcel.deviceNameSpaces, mac); in getEntries()
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | NetdEventListenerServiceTest.java | 84 final byte[] mac = MAC_ADDR; in testWakeupEventLogging() 102 wakeupEvent(iface, uids[0], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging() 103 wakeupEvent(iface, uids[1], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 104 wakeupEvent(iface, uids[2], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 105 wakeupEvent(iface, uids[3], v4, icmp6, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging() 106 wakeupEvent(iface, uids[4], v6, tcp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 107 wakeupEvent(iface, uids[5], v4, tcp, mac, srcIp, dstIp, sport, dport, now); in testWakeupEventLogging() 108 wakeupEvent(iface, uids[6], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 109 wakeupEvent(iface, uids[7], v6, tcp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() 110 wakeupEvent(iface, uids[8], v6, udp, mac, srcIp6, dstIp6, sport, dport, now); in testWakeupEventLogging() [all …]
|
D | IpConnectivityMetricsTest.java | 313 final byte[] mac = {0x48, 0x7c, 0x2b, 0x6a, 0x3e, 0x4b}; in testEndToEndLogging() 322 wakeupEvent("wlan0", 1000, v4, tcp, mac, srcIp, dstIp, sport, dport, 1001L); in testEndToEndLogging() 323 wakeupEvent("wlan0", 10123, v4, tcp, mac, srcIp, dstIp, sport, dport, 1001L); in testEndToEndLogging() 324 wakeupEvent("wlan0", 1000, v4, udp, mac, srcIp, dstIp, sport, dport, 1001L); in testEndToEndLogging() 325 wakeupEvent("wlan0", 10008, v4, udp, mac, srcIp, dstIp, sport, dport, 1001L); in testEndToEndLogging() 326 wakeupEvent("wlan0", -1, v4, udp, mac, srcIp, dstIp, sport, dport, 1001L); in testEndToEndLogging() 327 wakeupEvent("wlan0", 10008, v4, tcp, mac, srcIp, dstIp, sport, dport, 1001L); in testEndToEndLogging() 579 void wakeupEvent(String iface, int uid, int ether, int ip, byte[] mac, String srcIp, in wakeupEvent() argument 582 mNetdListener.onWakeupEvent(prefix, uid, ether, ip, mac, srcIp, dstIp, sport, dport, now); in wakeupEvent()
|
/frameworks/base/services/core/java/com/android/server/accounts/ |
D | CryptoHelper.java | 67 byte[] mac = createMac(encryptedBytes, iv); in encryptBundle() 71 encryptedBundle.putByteArray(KEY_MAC, mac); in encryptBundle() 82 byte[] mac = bundle.getByteArray(KEY_MAC); in decryptBundle() 83 if (!verifyMac(encryptedBytes, iv, mac)) { in decryptBundle() 116 Mac mac = Mac.getInstance(MAC_ALGORITHM); in createMac() local 117 mac.init(mMacKey); in createMac() 118 mac.update(cipher); in createMac() 119 mac.update(iv); in createMac() 120 return mac.doFinal(); in createMac()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/aware/ |
D | WifiAwareClientState.java | 215 public void onInterfaceAddressChange(byte[] mac) { in onInterfaceAddressChange() argument 220 HexEncoding.encode(mac)) + ", mLastDiscoveryInterfaceMac=" in onInterfaceAddressChange() 223 if (mNotifyIdentityChange && !Arrays.equals(mac, mLastDiscoveryInterfaceMac)) { in onInterfaceAddressChange() 228 mCallback.onIdentityChanged(hasPermission ? mac : ALL_ZERO_MAC); in onInterfaceAddressChange() 234 mLastDiscoveryInterfaceMac = mac; in onInterfaceAddressChange() 247 public void onClusterChange(int flag, byte[] mac, byte[] currentDiscoveryInterfaceMac) { in onClusterChange() argument 252 HexEncoding.encode(mac)) + ", currentDiscoveryInterfaceMac=" in onClusterChange()
|
/frameworks/base/services/backup/java/com/android/server/backup/encryption/chunking/ |
D | ChunkHasher.java | 39 Mac mac = Mac.getInstance(MAC_ALGORITHM); in computeHash() local 40 mac.init(mSecretKey); in computeHash() 41 return new ChunkHash(mac.doFinal(plaintext)); in computeHash()
|
/frameworks/av/media/libaudioprocessing/ |
D | AudioResamplerFirProcess.h | 27 void mac(int32_t& l, int32_t& r, TC coef, const int16_t* samples) in mac() function 36 void mac(int32_t& l, TC coef, const int16_t* samples) in mac() function 44 void mac(float& l, float& r, TC coef, const float* samples) in mac() function 52 void mac(float& l, TC coef, const float* samples) in mac() function 89 mac(value, coef, data++); in acc() 222 mac(l, r, TFUNC::interpolatep(coefsP[0], coefsP[count], lerpP), sP); in ProcessBase() 225 mac(l, r, TFUNC::interpolaten(coefsN[count], coefsN[0], lerpP), sN); in ProcessBase() 234 mac(l, TFUNC::interpolatep(coefsP[0], coefsP[count], lerpP), sP); in ProcessBase() 237 mac(l, TFUNC::interpolaten(coefsN[count], coefsN[0], lerpP), sN); in ProcessBase()
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/encryption/chunking/ |
D | ChunkHasherTest.java | 57 Mac mac = Mac.getInstance(MAC_ALGORITHM); in computeHash_returnsHmacForData() local 58 mac.init(mSecretKey); in computeHash_returnsHmacForData() 59 byte[] expectedHash = mac.doFinal(TEST_DATA); in computeHash_returnsHmacForData()
|
D | ChunkEncryptorTest.java | 113 Mac mac = Mac.getInstance(MAC_ALGORITHM); in encrypt_generatesHmacOfPlaintext() local 114 mac.init(mSecretKey); in encrypt_generatesHmacOfPlaintext() 115 byte[] plaintextHmac = mac.doFinal(PLAINTEXT_BYTES); in encrypt_generatesHmacOfPlaintext()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/hotspot2/ |
D | Utils.java | 53 long mac = 0; in parseMac() local 58 mac = (mac << 4) | nibble; in parseMac() 65 return mac; in parseMac() 68 public static String macToString(long mac) { in macToString() argument 69 int len = (mac & ~EUI48Mask) != 0 ? EUI64Length : EUI48Length; in macToString() 79 sb.append(String.format("%02x", (mac >>> n) & Constants.BYTE_MASK)); in macToString()
|
/frameworks/libs/net/common/framework/android/net/util/ |
D | MacAddressUtils.java | 89 MacAddress mac = MacAddress.fromBytes(byteAddrFromLongAddr(addr)); in createRandomUnicastAddress() local 90 if (mac.equals(DEFAULT_MAC_ADDRESS)) { in createRandomUnicastAddress() 93 return mac; in createRandomUnicastAddress()
|
/frameworks/av/media/libaudiohal/impl/ |
D | ConversionHelperHidl.cpp | 116 address.address.mac[0], address.address.mac[1], address.address.mac[2], in deviceAddressToHal() 117 address.address.mac[3], address.address.mac[4], address.address.mac[5]); in deviceAddressToHal()
|
D | DeviceHalHidl.cpp | 62 &address->address.mac[0], &address->address.mac[1], &address->address.mac[2], in deviceAddressFromHal() 63 &address->address.mac[3], &address->address.mac[4], &address->address.mac[5]); in deviceAddressFromHal()
|
/frameworks/base/wifi/java/android/net/wifi/rtt/ |
D | RangingResult.java | 89 public RangingResult(@RangeResultStatus int status, @NonNull MacAddress mac, int distanceMm, in RangingResult() argument 94 mMac = mac; in RangingResult() 365 MacAddress mac = null; 367 mac = MacAddress.CREATOR.createFromParcel(in); 389 return new RangingResult(status, mac, distanceMm, distanceStdDevMm, rssi,
|
/frameworks/base/core/java/android/content/pm/ |
D | MacAuthenticatedInputStream.java | 35 public MacAuthenticatedInputStream(InputStream in, Mac mac) { in MacAuthenticatedInputStream() argument 38 mMac = mac; in MacAuthenticatedInputStream()
|
/frameworks/base/core/java/android/hardware/biometrics/ |
D | CryptoObject.java | 45 public CryptoObject(@NonNull Mac mac) { in CryptoObject() argument 46 mCrypto = mac; in CryptoObject()
|
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/ |
D | SecureBox.java | 303 Mac mac = Mac.getInstance(MAC_ALG); in hkdfDeriveKey() local 305 mac.init(new SecretKeySpec(salt, MAC_ALG)); in hkdfDeriveKey() 310 byte[] pseudorandomKey = mac.doFinal(secret); in hkdfDeriveKey() 313 mac.init(new SecretKeySpec(pseudorandomKey, MAC_ALG)); in hkdfDeriveKey() 318 mac.update(info); in hkdfDeriveKey() 320 byte[] hkdfOutput = mac.doFinal(CONSTANT_01); in hkdfDeriveKey()
|
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/ |
D | WifiScoreCard.java | 519 MacAddress mac; in lookupBssid() local 524 mac = MacAddress.fromString(bssid); in lookupBssid() 528 PerBssid ans = mApForBssid.get(mac); in lookupBssid() 530 ans = new PerBssid(ssid, mac); in lookupBssid() 531 PerBssid old = mApForBssid.put(mac, ans); in lookupBssid() 583 private long computeHashLong(String ssid, MacAddress mac) { in computeHashLong() argument 590 mac.toByteArray() in computeHashLong() 631 PerBssid fetchByBssid(MacAddress mac) { in fetchByBssid() argument 632 return mApForBssid.get(mac); in fetchByBssid()
|
/frameworks/base/wifi/tests/src/android/net/wifi/rtt/ |
D | WifiRttManagerTest.java | 233 final MacAddress mac = MacAddress.fromString("00:01:02:03:04:05"); in testRangingResultsParcel() local 245 RangingResult result = new RangingResult(status, mac, distanceCm, distanceStdDevCm, rssi, in testRangingResultsParcel() 283 final MacAddress mac = MacAddress.fromString("00:01:02:03:04:05"); in testRangingResultsEqualityLciLcr() local 294 RangingResult rr1 = new RangingResult(status, mac, distanceCm, distanceStdDevCm, rssi, in testRangingResultsEqualityLciLcr() 296 RangingResult rr2 = new RangingResult(status, mac, distanceCm, distanceStdDevCm, rssi, in testRangingResultsEqualityLciLcr()
|
/frameworks/base/wifi/java/android/net/wifi/aware/ |
D | IdentityChangedListener.java | 36 public void onIdentityChanged(byte[] mac) { in onIdentityChanged() argument
|
D | IWifiAwareEventCallback.aidl | 30 void onIdentityChanged(in byte[] mac); in onIdentityChanged() argument
|