Check length of t_key and temp_key