Encrypting mechanism

Could I encrypt game’s files at the building step with my encrypting algorithm?
I didn’t find any information about it.

I want to put the encrypting at the building process and make the game decrypt game’s files with same algorithm.