f7147025dd
* Swap sdk/helper libs to go-secure-stdlib * Migrate to go-secure-stdlib reloadutil * Migrate to go-secure-stdlib kv-builder * Migrate to go-secure-stdlib gatedwriter
15 lines
314 B
Go
15 lines
314 B
Go
package rabbitmq
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hashicorp/go-secure-stdlib/base62"
|
|
)
|
|
|
|
func (b *backend) generatePassword(ctx context.Context, policyName string) (password string, err error) {
|
|
if policyName != "" {
|
|
return b.System().GeneratePasswordFromPolicy(ctx, policyName)
|
|
}
|
|
return base62.Random(36)
|
|
}
|