Rehash concept not clear

While we do

insert(temp-key, temp->value), won’t the rehash function also generate the same key through the hashFn.

this is not clear to me. please help.

@priyamthakuria27, when we are rehashing we double the table size (ts) and the hash function uses ts for computing hash value so we need to insert again so than we get new hash value due to updated table size.