const (
MinCostint = 4 // the minimum allowable cost as passed in to GenerateFromPasswordMaxCostint = 31 // the maximum allowable cost as passed in to GenerateFromPasswordDefaultCostint = 10 // the cost that will actually be set if a cost below MinCost is passed into GenerateFromPassword
)

Cost returns the hashing cost used to create the given hashed
password. When, in the future, the hashing cost of a password system needs
to be increased in order to adjust for greater computational power, this
function allows one to establish which passwords need to be updated.

GenerateFromPassword returns the bcrypt hash of the password at the given
cost. If the cost given is less than MinCost, the cost will be set to
DefaultCost, instead. Use CompareHashAndPassword, as defined in this package,
to compare the returned hashed password with its cleartext version.