326327328329330331332333334335336
// // add the text // cMac.update(data, dataOff, dataLen); return cMac.doFinal(macBlock, 0); } private boolean hasAssociatedText() { return associatedText != null && associatedText.length != 0;
825826827828829830831832833834835
loadStore(mIn); // Finalise our mac calculation byte[] mac = new byte[hMac.getMacSize()]; hMac.doFinal(mac, 0); // TODO Should this actually be reading the remainder of the stream? // Read the original mac from the stream byte[] oldMac = new byte[hMac.getMacSize()]; dIn.readFully(oldMac);
882883884885886887888889890891892
saveStore(mOut); byte[] mac = new byte[hMac.getMacSize()]; hMac.doFinal(mac, 0); dOut.write(mac); dOut.close(); }