RandomString -- Library to make passwords without misleading letters

RandomString -- Library to make passwords without misleading letters

CircleCI Coverage Status

This package makes random passwords with fast logic described in this link.

The original logic is NOT goroutine safe because it shares rand.Source and the Int63() calls conflict. The logic in this package is using sync.Mutex to solve this.

package main

import (
  "fmt"

  "github.com/delphinus/random-string"
)

func main() {
  pass := randomString.Generate(8);
  fmt.Printf("simple password: %s\n", pass)
	// simple password: JEVGqkiW
}

Benchmark

go version
go version go1.8.1 darwin/amd64
go test -bench . -benchmem
BenchmarkRandomString/Runes-8              50000             35584 ns/op            1312 B/op          2 allocs/op
BenchmarkRandomString/Bytes-8              50000             35547 ns/op             512 B/op          2 allocs/op
BenchmarkRandomString/Remainder-8          50000             34095 ns/op             512 B/op          2 allocs/op
BenchmarkRandomString/Mask-8               50000             35362 ns/op             512 B/op          2 allocs/op
BenchmarkRandomString/MaskImproved-8      300000              4710 ns/op             512 B/op          2 allocs/op
BenchmarkRandomString/MaskSource-8        500000              3873 ns/op             512 B/op          2 allocs/op
PASS
ok      github.com/delphinus/random-string      11.885s
Similar Resources

A convenience library for generating, comparing and inspecting password hashes using the scrypt KDF in Go 🔑

simple-scrypt simple-scrypt provides a convenience wrapper around Go's existing scrypt package that makes it easier to securely derive strong keys ("h

Dec 22, 2022

An authorization library that supports access control models like ACL, RBAC, ABAC in Golang

An authorization library that supports access control models like ACL, RBAC, ABAC in Golang

Casbin News: still worry about how to write the correct Casbin policy? Casbin online editor is coming to help! Try it at: https://casbin.org/editor/ C

Jan 6, 2023

Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go. Features ACME v2 RFC 8555 Register with CA Obtain certificates, both from scratch or with an exis

Dec 30, 2022

Idiomatic nmap library for go developers

Idiomatic nmap library for go developers

nmap This library aims at providing idiomatic nmap bindings for go developers, in order to make it easier to write security audit tools using golang.

Jan 6, 2023

Official library of StackPulse steps

StackPulse Steps This repository is the official library of StackPulse steps. StackPulse steps are containerized applications that can be composed tog

Jun 14, 2021

Secure Remote Password library for Go

go-srp NOTE: This is a port of node-srp to Go. I recommend reading their README for general information about the use of SRP. Installation go get gith

Aug 8, 2022

A simple, modern and secure encryption tool (and Go library) with small explicit keys, no config options, and UNIX-style composability.

age age is a simple, modern and secure file encryption tool, format, and library. It features small explicit keys, no config options, and UNIX-style c

Dec 28, 2022

Coraza WAF is a golang modsecurity compatible web application firewall library

Coraza WAF is a golang modsecurity compatible web application firewall library

Coraza Web Application Firewall, this project is a Golang port of ModSecurity with the goal to become the first enterprise-grade Open Source Web Application Firewall, flexible and powerful enough to serve as the baseline for many projects.

Jan 9, 2023

golang users friendly linux hacking library.

golang users friendly linux hacking library.

go-cheat users friendly linux hacking library

Nov 9, 2022
A Go Library For Generating Random, Rule Based Passwords. Many Random, Much Secure.
A Go Library For Generating Random, Rule Based Passwords. Many Random, Much Secure.

Can Haz Password? A Go library for generating random, rule based passwords. Many random, much secure. Features Randomized password length (bounded). T

Dec 6, 2021
linenoise is a library that generates strings of random characters that can be used as reasonably secure passwords.

linenoise linenoise is a library that generates strings of random characters (herein called a "noise") that can be used as reasonably secure passwords

Dec 7, 2022
Create strong passwords using words that are easy for you to remember
Create strong passwords using words that are easy for you to remember

Grasp Create strong passwords using words that are easy for you to remember A way to circumvent password complexity rules and restrictions while only

Nov 3, 2022
Find secrets and passwords in container images and file systems
Find secrets and passwords in container images and file systems

Find secrets and passwords in container images and file systems

Jan 1, 2023
Simple CLI to generate passwords

pwdrng Simple CLI to generate passwords $ pwdrng Copied password to clipboard: bfx861[X<26-b^UT Installation and Usage With Homebrew $ brew tap docto

Apr 8, 2022
Golang library to make sandboxing AppImages easy

aisap AppImage SAndboxing Project: a Golang library to help sandbox AppImages with bwrap What is it? aisap intends to be a simple way to implement And

Nov 16, 2022
Gomap is a package that contains several functions to make it easier to work with maps in Go.

Gomap Gomap is a package that contains several functions to make it easier to work with maps in Go. Installation go get github.com/dimasadyaksa/gomap

Apr 22, 2023
Let's Encrypt client and ACME library written in Go
Let's Encrypt client and ACME library written in Go

Let's Encrypt client and ACME library written in Go. Features ACME v2 RFC 8555 Register with CA Obtain certificates, both from scratch or with an exis

Dec 27, 2022
:key: Idiotproof golang password validation library inspired by Python's passlib

passlib for go Python's passlib is quite an amazing library. I'm not sure there's a password library in existence with more thought put into it, or wi

Dec 30, 2022