added pasword generate api.