password

package module
Version: v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 13

README

PkgGoDev CI

password-generator

Generates strong random password using algorithm described here: https://en.wikipedia.org/wiki/Random_password_generator#JavaScript

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(n int) string

func GenerateForCharset

func GenerateForCharset(n int, chset Charset) string

Types

type Charset

type Charset int
const (
	Uppercase     Charset = 1 << iota // 1 << 0 which is 00000001
	Lowercase                         // 1 << 1 which is 00000010
	Numbers                           // 1 << 2 which is 00000100
	Unreserved                        // 1 << 3 which is 00001000
	Reserved                          // 1 << 4 which is 00010000
	SimpleSymbols                     // 1 << 5 which is 00100000
	Symbols                           // 1 << 6 which is 01000000
	AlphaNum      = Uppercase | Lowercase | Numbers
	Default       = Uppercase | Lowercase | Numbers | SimpleSymbols
)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL