Home
last modified time | relevance | path

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

/development/samples/Vault/src/com/example/android/vault/
DEncryptedDocument.java361 final byte[] mac = new byte[MAC_KEY_LENGTH]; field in EncryptedDocument.Section
366 f.readFully(mac); in read()
372 f.write(mac); in write()
375 public void setMac(byte[] mac) { in setMac() argument
376 if (mac.length != this.mac.length) { in setMac()
379 System.arraycopy(mac, 0, this.mac, 0, this.mac.length); in setMac()
382 public void assertMac(byte[] mac) throws DigestException { in assertMac() argument
383 if (mac.length != this.mac.length) { in assertMac()
387 for (int i = 0; i < mac.length; i++) { in assertMac()
388 result |= mac[i] ^ this.mac[i]; in assertMac()
DVaultProvider.java189 final Mac mac = Mac.getInstance("HmacSHA256"); in loadOrGenerateKeys() local
190 mac.init(key); in loadOrGenerateKeys()
196 System.arraycopy(mac.doFinal(BLOB_DATA), 0, rawDataKey, 0, rawDataKey.length); in loadOrGenerateKeys()
197 System.arraycopy(mac.doFinal(BLOB_MAC), 0, rawMacKey, 0, rawMacKey.length); in loadOrGenerateKeys()