Skip to content

JustTimmm/GoPassword

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” GoPassword

GoPassword is a simple and powerful Go library to generate and save secure passwords.

πŸš€ Installation

To install GoPassword, run:

go get github.com/JustTimmm/GoPassword

Then import it into your project:

import "github.com/JustTimmm/GoPassword"

✨ Features

- Generate secure passwords with custom settings
- Save passwords as JSON files

✨ Quick Example

With GoColor, you can apply text colors, background colors, and text styles (like bold, italic, etc.) to your strings. Here is a basic example:

package main

import (
	"fmt"
	"github.com/JustTimmm/GoPassword"
)

func main() {
	password := GoPassword.GeneratePassword(16, true, true, true, true)
	GoPassword.SavePassword("file", password)
}

πŸ”§ Options

GeneratePassword(width uint8, number, specialCharacter, uppercase, lowercase bool) string

Parameter Type Description
width uint8 Length of the password (8 to 128 characters)
number bool Include digits (0-9)
specialCharacter bool Include special characters (e.g. #, ?)
uppercase bool Include uppercase letters (A-Z)
lowercase bool Include lowercase letters (a-z)

πŸ’Ύ Saving Passwords

Use SavePassword(filename string, password string) to store your password in a JSON file:

{
  "password": "Example123!"
}

The file will be saved as filename.json.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

For better passwords πŸ”‘

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages