Allah (swt) knows the secret, the unknown and the known as such. We never think that since Allah (swt) is unseen He knows only the unknown. Rather, the Almighty knows the unknown along with what one’s show; and that’s for all people.
(… وَيَعْلَمُ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ …) (…And He knows that which is in the heavens and that which is on the earth …): Allah (swt) doesn’t only know what humans show or hide but also whatever is there in heaven and on earth.
( وَاللَّهُ عَلَىٰ كُلِّ شَيْءٍ قَدِيرٌ … ) (…And Allah is over all things competent): The competence of the Almighty is limitless and He is capable of everything:
{ إِنَّمَا أَمْرُهُ إِذَا أَرَادَ شَيْئًا أَن يَقُولَ لَهُ كُن فَيَكُونُ}
(His command is only when He intends a thing that He says to it, “Be,” and it is.) (Yaseen: 82)
These verses are related to the fiducial education so that people know that there will be difficulties in life, and the Almighty doesn’t want to blame people nor force them. Moreover, the Almighty is aware of the intentions, and a good intention leads to good deeds. Anyhow, Allah (swt) never charges one’s self beyond its capacity:
{ لَا يُكَلِّفُ اللَّهُ نَفْسًا إِلَّا وُسْعَهَا}
(Allah does not charge a soul except [with that within] its capacity.) (Al-Baqara: 286)