Setting up the encryption function.