added back fallback mechanism for generating salt.