add encrypt and decrypt functions to the client class