Home
last modified time | relevance | path

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

/frameworks/libs/net/common/tests/unit/src/android/net/util/
DMacAddressUtilsTest.java54 for (MacAddress mac : multicastAddresses) { in testIsMulticastAddress()
55 String msg = mac.toString() + " expected to be a multicast address"; in testIsMulticastAddress()
56 assertTrue(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress()
58 for (MacAddress mac : unicastAddresses) { in testIsMulticastAddress()
59 String msg = mac.toString() + " expected not to be a multicast address"; in testIsMulticastAddress()
60 assertFalse(msg, MacAddressUtils.isMulticastAddress(mac)); in testIsMulticastAddress()
69 MacAddress mac = MacAddressUtils.createRandomUnicastAddress(); in testMacAddressRandomGeneration() local
70 String stringRepr = mac.toString(); in testMacAddressRandomGeneration()
73 mac.isLocallyAssigned()); in testMacAddressRandomGeneration()
74 assertEquals(MacAddress.TYPE_UNICAST, mac.getAddressType()); in testMacAddressRandomGeneration()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/pm/
DMacAuthenticatedInputStreamTest.java73 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/
DUtil.java102 Mac mac = null; in computeHkdf() local
104 mac = Mac.getInstance(macAlgorithm); in computeHkdf()
108 if (size > 255 * mac.getMacLength()) { in computeHkdf()
116 mac.init(new SecretKeySpec(new byte[mac.getMacLength()], macAlgorithm)); in computeHkdf()
118 mac.init(new SecretKeySpec(salt, macAlgorithm)); in computeHkdf()
120 byte[] prk = mac.doFinal(ikm); in computeHkdf()
124 mac.init(new SecretKeySpec(prk, macAlgorithm)); in computeHkdf()
127 mac.update(digest); in computeHkdf()
128 mac.update(info); in computeHkdf()
129 mac.update((byte) ctr); in computeHkdf()
[all …]
DCredstoreIdentityCredential.java338 byte[] mac = resultParcel.mac; in getEntries()
339 if (mac != null && mac.length == 0) { in getEntries()
340 mac = null; in getEntries()
343 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.java89 MacAddress mac = MacAddress.fromBytes(byteAddrFromLongAddr(addr)); in createRandomUnicastAddress() local
90 if (mac.equals(DEFAULT_MAC_ADDRESS)) { in createRandomUnicastAddress()
93 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.java45 public CryptoObject(@NonNull Mac mac) { in CryptoObject() argument
46 mCrypto = mac; in CryptoObject()
DBiometricPrompt.java676 public CryptoObject(@NonNull Mac mac) { in CryptoObject() argument
677 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/base/libs/androidfw/fuzz/cursorwindow_fuzzer/
DAndroid.bp40 // libbinder is not supported on mac
/frameworks/base/libs/androidfw/
DAndroid.bp253 // libbinder is not supported on mac
/frameworks/base/core/java/android/hardware/fingerprint/
DFingerprintManager.java226 public CryptoObject(@NonNull Mac mac) { in CryptoObject() argument
227 super(mac); in CryptoObject()
/frameworks/proto_logging/stats/
Datoms.proto2175 // the mac address of the bluetooth device that is connected.