code: func (s *Salt) Generate(length int) []byte {
  	if length > s.SaltLenMax {
  		length = s.SaltLenMax
  	} else if length < s.SaltLenMin {
  		length = s.SaltLenMin
  	}
  
  	saltLen := (length * 6 / 8)
  	if (length*6)%8 != 0 {
  		saltLen += 1
  	}
  	salt := make([]byte, saltLen)
  	rand.Read(salt)
  
  	out := make([]byte, len(s.MagicPrefix)+length)
  	copy(out, s.MagicPrefix)
  	copy(out[len(s.MagicPrefix):], Base64_24Bit(salt))
  	return out
  }
docs: // Generate generates a random salt of a given length.
  //
  // The length is set thus:
  //
  //   length > SaltLenMax: length = SaltLenMax
  //   length < SaltLenMin: length = SaltLenMin