Can text and media content be encrypted using the same encryption algorithm ? and if there's an algorithm that can do that, how does it work ?
Typically encryption algorithms like AES work on binary data. So before encryption you should encode your data to a binary format. For text an encoding like UTF-8 can be used.