Generates salt with given amount of rounds / cost.
This cost is also known as the work factor. It is recommended as a common rule of thumb for work factor setting to tune the cost so that the function runs as slow as possible without affecting the users experience and without increasing the need to use additional hardware that may be over budget.
This function does not take much work effort so is not offered as a long running task.
This function can raise InvalidArgumentException exception.