Home
last modified time | relevance | path

Searched refs:mac (Results 1 – 25 of 28) sorted by relevance

12

/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/
DMacAddressUtilsTest.java53 for (MacAddress mac : multicastAddresses) { in testIsMulticastAddress()
54 String msg = mac.toString() + " expected to be a multicast address"; in testIsMulticastAddress()
55 assertTrue(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress()
57 for (MacAddress mac : unicastAddresses) { in testIsMulticastAddress()
58 String msg = mac.toString() + " expected not to be a multicast address"; in testIsMulticastAddress()
59 assertFalse(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress()
68 MacAddress mac = MacAddressUtils.createRandomUnicastAddress(); in testMacAddressRandomGeneration() local
69 String stringRepr = mac.toString(); in testMacAddressRandomGeneration()
72 mac.isLocallyAssigned()); in testMacAddressRandomGeneration()
73 assertEquals(MacAddress.TYPE_UNICAST, mac.getAddressType()); in testMacAddressRandomGeneration()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DMacAuthenticatedInputStreamTest.java75 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_Success() local
76 mac.init(HMAC_KEY_1); in testString1Authenticate_Success()
78 MacAuthenticatedInputStream is = new MacAuthenticatedInputStream(mTestStream1, mac); in testString1Authenticate_Success()
86 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_WrongTag_Failure() local
87 mac.init(HMAC_KEY_1); in testString1Authenticate_WrongTag_Failure()
89 MacAuthenticatedInputStream is = new MacAuthenticatedInputStream(mTestStream1, mac); in testString1Authenticate_WrongTag_Failure()
97 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_NullTag_Failure() local
98 mac.init(HMAC_KEY_1); in testString1Authenticate_NullTag_Failure()
100 MacAuthenticatedInputStream is = new MacAuthenticatedInputStream(mTestStream1, mac); in testString1Authenticate_NullTag_Failure()
108 Mac mac = Mac.getInstance("HMAC-SHA1"); in testString1Authenticate_ReadSingleByte_Success() local
[all …]
/frameworks/base/identity/java/android/security/identity/
DUtil.java125 Mac mac = null; in computeHkdf() local
127 mac = Mac.getInstance(macAlgorithm); in computeHkdf()
131 if (size > 255 * mac.getMacLength()) { in computeHkdf()
139 mac.init(new SecretKeySpec(new byte[mac.getMacLength()], macAlgorithm)); in computeHkdf()
141 mac.init(new SecretKeySpec(salt, macAlgorithm)); in computeHkdf()
143 byte[] prk = mac.doFinal(ikm); in computeHkdf()
147 mac.init(new SecretKeySpec(prk, macAlgorithm)); in computeHkdf()
150 mac.update(digest); in computeHkdf()
151 mac.update(info); in computeHkdf()
152 mac.update((byte) ctr); in computeHkdf()
[all …]
DCredstoreIdentityCredential.java349 byte[] mac = resultParcel.mac; in getEntries()
350 if (mac != null && mac.length == 0) { in getEntries()
351 mac = null; in getEntries()
354 resultParcel.staticAuthenticationData, resultParcel.deviceNameSpaces, mac); in getEntries()
/frameworks/base/services/core/java/com/android/server/accounts/
DCryptoHelper.java68 byte[] mac = createMac(encryptedBytes, iv); in encryptBundle()
72 encryptedBundle.putByteArray(KEY_MAC, mac); in encryptBundle()
83 byte[] mac = bundle.getByteArray(KEY_MAC); in decryptBundle()
84 if (!verifyMac(encryptedBytes, iv, mac)) { in decryptBundle()
117 Mac mac = Mac.getInstance(MAC_ALGORITHM); in createMac() local
118 mac.init(mMacKey); in createMac()
119 mac.update(cipher); in createMac()
120 mac.update(iv); in createMac()
121 return mac.doFinal(); in createMac()
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/
DHardwareAuthTokenUtilsTest.java63 hardwareAuthToken.mac = new byte[32]; in testHardwareAuthTokenLoopBack()
65 for (int i = 0; i < hardwareAuthToken.mac.length; i++) { in testHardwareAuthTokenLoopBack()
66 hardwareAuthToken.mac[i] = (byte) i; in testHardwareAuthTokenLoopBack()
79 for (int i = 0; i < hardwareAuthToken.mac.length; i++) { in testHardwareAuthTokenLoopBack()
80 assertEquals(hardwareAuthToken.mac[i], hardwareAuthToken2.mac[i]); in testHardwareAuthTokenLoopBack()
/frameworks/base/packages/BackupEncryption/src/com/android/server/backup/encryption/chunking/
DChunkHasher.java41 Mac mac = Mac.getInstance(MAC_ALGORITHM); in computeHash() local
42 mac.init(mSecretKey); in computeHash()
43 return new ChunkHash(mac.doFinal(plaintext)); in computeHash()
/frameworks/libs/service_entitlement/java/com/android/libraries/entitlement/eapaka/
DEapAkaResponse.java165 byte[] mac = calculateMac(aut, message); in generateEapAkaChallengeResponse()
166 if (mac == null) { in generateEapAkaChallengeResponse()
173 System.arraycopy(mac, 0, message, index, mac.length); in generateEapAkaChallengeResponse()
280 Mac mac = Mac.getInstance(ALGORITHM_HMAC_SHA1); in calculateMac() local
282 mac.init(secret); in calculateMac()
283 byte[] output = mac.doFinal(message); in calculateMac()
/frameworks/base/services/core/java/com/android/server/biometrics/
DHardwareAuthTokenUtils.java53 System.arraycopy(hat.mac, 0 /* srcPos */, array, 37 /* destPos */, hat.mac.length); in toByteArray()
80 hardwareAuthToken.mac = new byte[32]; in toHardwareAuthToken()
82 hardwareAuthToken.mac, in toHardwareAuthToken()
/frameworks/av/media/libaudioprocessing/
DAudioResamplerFirProcess.h27 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/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/
DChunkHasherTest.java57 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()
DChunkEncryptorTest.java113 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/libs/net/common/framework/com/android/net/module/util/
DMacAddressUtils.java90 MacAddress mac = MacAddress.fromBytes(byteAddrFromLongAddr(addr)); in createRandomUnicastAddress() local
91 if (mac.equals(DEFAULT_MAC_ADDRESS)) { in createRandomUnicastAddress()
94 return mac; in createRandomUnicastAddress()
/frameworks/base/core/java/android/content/pm/
DMacAuthenticatedInputStream.java35 public MacAuthenticatedInputStream(InputStream in, Mac mac) { in MacAuthenticatedInputStream() argument
38 mMac = mac; in MacAuthenticatedInputStream()
/frameworks/base/keystore/java/android/security/
DAuthTokenUtils.java67 hardwareAuthToken.mac = new byte[32]; in toHardwareAuthToken()
69 hardwareAuthToken.mac, in toHardwareAuthToken()
/frameworks/base/core/java/android/hardware/biometrics/
DCryptoObject.java46 public CryptoObject(@NonNull Mac mac) { in CryptoObject() argument
47 mCrypto = mac; in CryptoObject()
DBiometricPrompt.java709 public CryptoObject(@NonNull Mac mac) { in CryptoObject() argument
710 super(mac); in CryptoObject()
/frameworks/base/services/core/java/com/android/server/locksettings/recoverablekeystore/
DSecureBox.java303 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/base/wifi/java/src/android/net/wifi/
DSoftApConfToXmlMigrationUtil.java218 for (MacAddress mac: softApConf.getBlockedClientList()) { in convertConfToXml()
219 XmlUtils.writeValueXml(mac.toString(), XML_TAG_CLIENT_MACADDRESS, out); in convertConfToXml()
223 for (MacAddress mac: softApConf.getAllowedClientList()) { in convertConfToXml()
224 XmlUtils.writeValueXml(mac.toString(), XML_TAG_CLIENT_MACADDRESS, out); in convertConfToXml()
/frameworks/libs/net/common/testutils/devicetests/com/android/testutils/
DRouterAdvertisementResponder.java108 public void addRouterEntry(MacAddress mac, Inet6Address ip) { in addRouterEntry() argument
109 mNeighborMap.put(ip, new Pair<>(mac, true)); in addRouterEntry()
117 public void addNeighborEntry(MacAddress mac, Inet6Address ip) { in addNeighborEntry() argument
118 mNeighborMap.put(ip, new Pair<>(mac, false)); in addNeighborEntry()
/frameworks/base/media/aidl_api/android.media.audio.common.types/1/android/media/audio/common/
DAudioDeviceAddress.aidl39 byte[] mac;
/frameworks/base/media/aidl/android/media/audio/common/
DAudioDeviceAddress.aidl45 byte[] mac;
/frameworks/base/media/aidl_api/android.media.audio.common.types/current/android/media/audio/common/
DAudioDeviceAddress.aidl39 byte[] mac;
/frameworks/base/libs/androidfw/fuzz/cursorwindow_fuzzer/
DAndroid.bp40 // libbinder is not supported on mac
/frameworks/libs/net/common/device/com/android/net/module/util/netlink/
DStructNlAttr.java191 public StructNlAttr(short type, @NonNull final MacAddress mac) { in StructNlAttr() argument
193 setValue(mac.toByteArray()); in StructNlAttr()

12