You only have to encrypt/decrypt the literals and for that you can write a simple xor function.
Also note that to prevent hacking you need to prevent those strings to be stored in a data or rodata section.
Because a hacker will know it is encrypted data anyway.