All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
These whispers will not harm you as long as you hate them and repel them. Your hatred and repulsion of these whispers proves the soundness of your faith.
Therefore, you must ignore these whispers and not pay any attention to them.
If it happens that you have such whispers again, then seek refuge in Allah from the devil and say, ‘I believe in Allah’.
Then refrain from thinking about them or giving in to them.
Allah knows best.