sethvargo / Go Password
Licence: mit
A Golang library for generating high-entropy random passwords similar to 1Password or LastPass.
Stars: ✭ 317
Projects that are alternatives of or similar to Go Password
webpassgen
Simple web-based password generator
Stars: ✭ 111 (-64.98%)
Mutual labels: password-generator, password
LAPSforMac
Local Administrator Password Solution for Mac
Stars: ✭ 29 (-90.85%)
Mutual labels: password-generator, password
moac
Generate passwords and analyze their strength given physical limits to computation
Stars: ✭ 16 (-94.95%)
Mutual labels: password-generator, password
Xbruteforcer
X Brute Forcer Tool 🔓 WordPress , Joomla , DruPal , OpenCart , Magento
Stars: ✭ 261 (-17.67%)
Mutual labels: password, password-generator
mopass
A OpenSource Clientless & Serverless Password Manager
Stars: ✭ 40 (-87.38%)
Mutual labels: password-generator, password
MasterPassX
A deterministic stateless password generator.
Stars: ✭ 21 (-93.38%)
Mutual labels: password-generator, password
MagicPassword
Need to generate a password? Try Gaowanliang Strong Password Generator. Just need a master password to generate secure passwords to keep your network safe.
Stars: ✭ 19 (-94.01%)
Mutual labels: password-generator, password
lockd
Generate strong passwords and save them in Keychain. Made with SwiftUI
Stars: ✭ 38 (-88.01%)
Mutual labels: password-generator, password
OormiPass
Free open source cross platform password manager
Stars: ✭ 50 (-84.23%)
Mutual labels: password-generator, password
Passky-Server
API and Database for Passky (password manager)
Stars: ✭ 77 (-75.71%)
Mutual labels: password-generator, password
chinese-diceware
Diceware word lists in Chinese
Stars: ✭ 27 (-91.48%)
Mutual labels: password-generator, password
password-list
Password lists with top passwords to optimize bruteforce attacks
Stars: ✭ 174 (-45.11%)
Mutual labels: password-generator, password
Passky-Desktop
Desktop application for Passky (password manager)
Stars: ✭ 47 (-85.17%)
Mutual labels: password-generator, password
longtongue
Customized Password/Passphrase List inputting Target Info
Stars: ✭ 61 (-80.76%)
Mutual labels: password-generator, password
PasswordX
Offline password manager for iOS/macOS
Stars: ✭ 26 (-91.8%)
Mutual labels: password-generator, password
diceware
Improved diceware passphrases
Stars: ✭ 16 (-94.95%)
Mutual labels: password-generator, password
Golang Password Generator
This library implements generation of random passwords with provided requirements as described by AgileBits 1Password in pure Golang. The algorithm is commonly used when generating website passwords.
The library uses crypto/rand for added randomness.
Sample example passwords this library may generate:
0N[k9PhDqmmfaO`p_XHjVv`HTq|zsH4XiH8umjg9JAGJ#\Qm6lZ,28XF4{X?3sHj
[email protected]|0H7!4p\,c<!32:)0.9N
UlYuRtgqyWEivlXnLeBpZvIQ
Q795Im1VR5h363s48oZGaLDa
wpvbxlsc
Installation
$ go get -u github.com/sethvargo/go-password/password
Usage
package main
import (
"log"
"github.com/sethvargo/go-password/password"
)
func main() {
// Generate a password that is 64 characters long with 10 digits, 10 symbols,
// allowing upper and lower case letters, disallowing repeat characters.
res, err := password.Generate(64, 10, 10, false, false)
if err != nil {
log.Fatal(err)
}
log.Printf(res)
}
See the GoDoc for more information.
Testing
For testing purposes, instead of accepted a *password.Generator
struct, accept
a password.PasswordGenerator
interface:
// func MyFunc(p *password.Generator)
func MyFunc(p password.PasswordGenerator) {
// ...
}
Then, in tests, use a mocked password generator with stubbed data:
func TestMyFunc(t *testing.T) {
gen := password.NewMockGenerator("canned-response", false)
MyFunc(gen)
}
In this example, the mock generator will always return the value "canned-response", regardless of the provided parameters.
License
This code is licensed under the MIT license.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].