public synchronized void insertChunkAuthTag(int chunkIdx,byte[] chunkAuthTag) throws FileEncryptionException {
  if (chunkIdx < 0 || chunkAuthTag == null || chunkAuthTag.length != CHUNK_AUTH_TAG_LENGTH) {
    throw new FileEncryptionException("Invalid auth tag parameter given!");
  }
 else {
    if (atagList.size() <= chunkIdx) {
      atagList.ensureCapacity(chunkIdx + 1);
      padTo(atagList,chunkIdx);
      atagList.add(chunkIdx,Arrays.copyOf(chunkAuthTag,CHUNK_AUTH_TAG_LENGTH));
    }
 else {
      atagList.set(chunkIdx,Arrays.copyOf(chunkAuthTag,CHUNK_AUTH_TAG_LENGTH));
    }
  }
}

public synchronized void insertChunkAuthTag ( int chunkIdx , byte [ ] chunkAuthTag ) throws FileEncryptionException { if ( chunkIdx < 0 || chunkAuthTag == null || chunkAuthTag . length != CHUNK_AUTH_TAG_LENGTH ) { throw new FileEncryptionException ( "Invalid auth tag parameter given!" ) ; } else { if ( atagList . size ( ) <= chunkIdx ) { atagList . ensureCapacity ( chunkIdx + 1 ) ; padTo ( atagList , chunkIdx ) ; atagList . add ( chunkIdx , Arrays . copyOf ( chunkAuthTag , CHUNK_AUTH_TAG_LENGTH ) ) ; } else { atagList . set ( chunkIdx , Arrays . copyOf ( chunkAuthTag , CHUNK_AUTH_TAG_LENGTH ) ) ; } } }
method inserts a new authentication tag without setting the needsupdate flag . to be used for initial construction of the authentication tag table .
