Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pwgen

Build Status Go Report Card

Go library to generate a random string of a given length

Installation

This package can be installed using the "go get" command

go get github.com/chr4/pwgen

Usage

package main

import (
    "fmt"
    "github.com/chr4/pwgen"
)

func main() {
    // The following functions will generate 20 chars long passwords out of
    fmt.Print(pwgen.New(20, "ab"))       // a's and b's
    fmt.Print(pwgen.Num(20))             // numbers
    fmt.Print(pwgen.Alpha(20))           // alphabets
    fmt.Print(pwgen.Symbols(20))         // symbols
    fmt.Print(pwgen.AlphaNum(20))        // alphanumeric characters
    fmt.Print(pwgen.AlphaNumSymbols(20)) // alphanumeric characters and symbols
}

About

Go library to generate a random string of a given length

Resources

Stars

10 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages