rest client and some encryption method