rand

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewName

func NewName() string

func NewPassword

func NewPassword(length ...int) string

NewPassword generates a cryptographically secure random password.

The password consists of a mix of lowercase letters, uppercase letters, numbers, and symbols. The default length is 16 characters. You can optionally provide a `length` argument to specify a different length.

If the provided length is less than or equal to 0, the default length of 16 is used.

This function uses the `crypto/rand` package to ensure a high level of randomness and security, suitable for generating passwords

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL