public synchronized boolean verifyChunkAuthTag(int chunkIdx,byte[] chunkAuthTag) throws FileEncryptionException {
  if ((chunkIdx < 0) || (chunkAuthTag == null) || (chunkAuthTag.length != backEncRandomAccessFile.CHUNK_TLEN)) {
    throw new FileEncryptionException("Invalid auth tag parameter given!");
  }
 else {
    byte[] storedAuthTag=atagList.get(chunkIdx);
    if (storedAuthTag == null || !Arrays.equals(chunkAuthTag,storedAuthTag)) {
      return false;
    }
 else {
      return true;
    }
  }
}

public synchronized boolean verifyChunkAuthTag ( int chunkIdx , byte [ ] chunkAuthTag ) throws FileEncryptionException { if ( ( chunkIdx < 0 ) || ( chunkAuthTag == null ) || ( chunkAuthTag . length != backEncRandomAccessFile . CHUNK_TLEN ) ) { throw new FileEncryptionException ( "Invalid auth tag parameter given!" ) ; } else { byte [ ] storedAuthTag = atagList . get ( chunkIdx ) ; if ( storedAuthTag == null || ! Arrays . equals ( chunkAuthTag , storedAuthTag ) ) { return false ; } else { return true ; } } }
verifies if the given chunk authentication tag equals the one in the authentication tag list , but does not verify if the complete list of all authentication tags is valid w . r . t . the central file authentication tag
