README

PkgGoDev CI

password-generator

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

Expand ▾ Collapse ▴

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