Made the Encrypt function