keys/bcrypt/bcrypt.go
func (p *hashed) decodeCost(sbytes []byte) (int, error) {
	cost, err := strconv.Atoi(string(sbytes[0:2]))
	if err != nil {
		return -1, err
	}
	err = checkCost(cost)
	if err != nil {
		return -1, err
	}
	p.cost = cost
	return 3, nil
}
func (p *hashed) decodeCost(sbytes []byte) (int, error) {
	cost, err := strconv.Atoi(string(sbytes[0:2]))
	if err != nil {
		return -1, err
	}
	err = checkCost(cost)
	if err != nil {
		return -1, err
	}
	p.cost = cost
	return 3, nil
}
func ( p * hashed ) decodeCost ( sbytes [ ] byte ) ( int , error ) { cost , err := strconv . Atoi ( string ( sbytes [ 0 : 2 ] ) ) if err != nil { return - 1 , err } err = checkCost ( cost ) if err != nil { return - 1 , err } p . cost = cost return 3 , nil }
// sbytes should begin where decodeVersion left off.
sbytes should begin where decodeVersion left off .