}
Cipher cipher = this.makePBECipher(cipherAlg, Cipher.DECRYPT_MODE, password, salt, iterationCount);
CipherInputStream cIn = new CipherInputStream(dIn, cipher);
Digest dig = new SHA1Digest();
DigestInputStream dgIn = new DigestInputStream(cIn, dig);
this.loadStore(dgIn);
// Finalise our digest calculation
byte[] hash = new byte[dig.getDigestSize()];
dig.doFinal(hash, 0);
// TODO Should this actually be reading the remainder of the stream?
// Read the original digest from the stream
byte[] oldHash = new byte[dig.getDigestSize()];
Streams.readFully(cIn, oldHash);
if (!Arrays.constantTimeAreEqual(hash, oldHash))
{
table.clear();