add encrypt password function.