# GenerateParameterDefault

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `struct`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Represents that a default value should be generated.

## Remarks

The recommended minimum bits of entropy for a generated password is 128 bits.
The general calculation of bits of entropy is:
`log base 2 (numberPossibleOutputs)`
This generator uses 23 upper case, 23 lower case (excludes i,l,o,I,L,O to prevent confusion),
10 numeric, and 11 special characters. So a total of 67 possible characters.
When all character sets are enabled, the number of possible outputs is `(67 ^ length)`.
The minimum password length for 128 bits of entropy is 22 characters: `log base 2 (67 ^ 22)`.
When character sets are disabled, it lowers the number of possible outputs and thus the bits of entropy.
Using MinLower, MinUpper, MinNumeric, and MinSpecial also lowers the number of possible outputs and thus the bits of entropy.
A generalized lower-bound formula for the number of possible outputs is to consider a string of the form:
```
{nonRequiredCharacters}{requiredCharacters}
let a = MinLower, b = MinUpper, c = MinNumeric, d = MinSpecial
let x = length - (a + b + c + d)
nonRequiredPossibilities = 67^x
requiredPossibilities = 23^a * 23^b * 10^c * 11^d * (a + b + c + d)! / (a! * b! * c! * d!)
lower-bound of total possibilities = nonRequiredPossibilities * requiredPossibilities
```
Putting it all together, the lower-bound bits of entropy calculation is:
```
log base 2 [67^x * 23^a * 23^b * 10^c * 11^d * (a + b + c + d)! / (a! * b! * c! * d!)]
```

## Definition

```go
type GenerateParameterDefault struct {
    MinLength  float64 `json:"MinLength"`
    Lower      bool    `json:"Lower"`
    Upper      bool    `json:"Upper"`
    Numeric    bool    `json:"Numeric"`
    Special    bool    `json:"Special"`
    MinLower   float64 `json:"MinLower"`
    MinUpper   float64 `json:"MinUpper"`
    MinNumeric float64 `json:"MinNumeric"`
    MinSpecial float64 `json:"MinSpecial"`
}
```

## Fields

- `MinLength`: `float64` -- Gets or sets the minimum length of the generated value.
- `Lower`: `bool` -- Gets or sets a value indicating whether to include lowercase alphabet characters in the result.
- `Upper`: `bool` -- Gets or sets a value indicating whether to include uppercase alphabet characters in the result.
- `Numeric`: `bool` -- Gets or sets a value indicating whether to include numeric characters in the result.
- `Special`: `bool` -- Gets or sets a value indicating whether to include special characters in the result.
- `MinLower`: `float64` -- Gets or sets the minimum number of lowercase characters in the result.
- `MinUpper`: `float64` -- Gets or sets the minimum number of uppercase characters in the result.
- `MinNumeric`: `float64` -- Gets or sets the minimum number of numeric characters in the result.
- `MinSpecial`: `float64` -- Gets or sets the minimum number of special characters in the result.
