separate hash and encypt