Commit graph

34 commits

Author SHA1 Message Date
f2a57cf46f
Update flag order and add -mX and -p flags in apg.go
The flag assignments in apg.go have been updated to be in alphabetic order and two new flags, `-mX` and `-p`, have been added. This change improves readability and makes maintaining the code easier, while not affecting the algorithm's functionality.
2024-03-12 20:43:48 +01:00
d521defa38
Rearrange flag assignments for readability in apg.go
The flag assignments in the apg.go file have been rearranged and organized in alphabetical order by their first letter for better readability and easy management. The logic remains unaffected, but the changes should improve the overall code aesthetic and maintainability.
2024-03-12 20:41:24 +01:00
2143ca99f5
Added option to exclude certain characters in password generation
The code now supports the configuration parameter 'ExcludeChars', which gives users the ability to specify particular characters that should not be included in the generated passwords. This addition was fully implemented both on config.go and random.go, while the relevant option flag was also added to apg.go for user interaction.
2024-03-12 20:31:27 +01:00
1eb4cf37e2
Added version display feature in apg.go
An option flag has been added to apg.go, which allows users to check the version of the script. When activated, the script displays the version and exits. It also provides OS and architecture information, outputted to stderr for user convenience.
2024-03-12 20:12:32 +01:00
87f93ddbc6
Add HIBP password check functionality
Implemented HIBP password check feature which will crosscheck generated passwords with the HIBP pwned passwords database. This functionality enhances security by not recommending potentially compromised passwords. A new flag, CheckHIBP has been added to enable or disable this feature.
2024-03-12 19:00:21 +01:00
fefb2557fc
Refactor spelling of "Pronounceable" and introduce syllable spelling feature
The spelling of "Pronounceable" has been adjusted throughout the code. Moreover, a new functionality for producing pronounceable passwords spelled as correlating syllables has been integrated. This includes relevant changes to password character sets used for pronounceable passwords and enhancements to test this new feature.
2024-03-12 18:28:01 +01:00
4219a27007
Refactor variable names and improve code readability in apg.go
Updated several variable names such as 'c' to 'config' and 'al' to 'algorithm' in order to improve code readability and understanding. An additional 'SpellPassword' option was added to provide users the ability to hear their passwords spelled out, enhancing functionality. This improves readability and user experience.
2024-03-08 16:02:32 +01:00
4b874e499e
Fix typos in 'implies' within command-line flags description
The previous version misspelled 'implies' as 'imlies' for several command-line flags (-mN, -mS, -mU) in the apg.go file. This commit corrects these typos, ensuring clarity and better understanding of the program's functions and usage.
2024-03-07 21:51:52 +01:00
8dce4d2eb9
Update import path and change copyright year in apg.go
The import path of the module "apg-go" has been changed to "src.neessen.cloud/wneessen/apg-go". Furthermore the copyright year mentioned in the usage text has been updated to 2024.
2024-03-07 21:15:49 +01:00
203da17634
#52 and #53: Increase password generation flexibility and error handling
Added code to check if set minimum password requirements are met after generating a random password. If not, the password generation process is repeated.
This not only adds an extra layer of security but also ensures that all set criteria for the password are met.
Also enhanced error handling in functions that could return a negative integer when asked for a random number.
Changed 'minimum amount of' parameter descriptions in apg.go to avoid confusion.
2023-08-06 18:55:47 +02:00
2822f73f56
#53 Add coinflip algorithm and improve error messages
Introduced a new password generation algorithm, called 'coinflip', which simply returns "Heads" or "Tails". Associated CLI flag has been added as well. Also, improved error messages during password generation. This addition provides a simpler algorithm option and clearer user feedback during errors.
2023-08-05 18:10:11 +02:00
af6d87c1a3
#53 and #52: Update "Number" references to "Numeric" in password generator
Replaced all instances of "Number" with "Numeric" in the password
generator. This modification will make the password generation code
more intuitive and readable. Moreover, minimum character requirements
were added for each character type, giving more flexibility to the
password generation settings.
2023-08-05 17:54:41 +02:00
d28b0645fd
#53 Update CLI usage message in apg.go
The usage message has been updated in apg.go to improve its clarity and usefulness. Changes include displaying the version number dynamically, providing the project's GitHub link, changing the term 'options' to 'flags', and more precise terminology in descriptions. Also, formatting has been adjusted to improve readability.
2023-08-05 15:14:43 +02:00
499a82d884
#53 Add fixed length option for password generation
A FixedLength field was added to the Config struct and a corresponding command line flag was added in `apg.go`. The field allows for the generation of passwords of a fixed length, overriding the MinLength and MaxLength values if present. Revised the `random.go` script to accommodate this change. The option for fixed length enhances the flexibility and customization of the password generation tool.
2023-08-05 15:04:34 +02:00
1e1ae45e74
#53 Refactor password generator to include additional modes
Updated the password generator to include default modes for characters along with options to enable complex password mode and toggle specific character types in passwords from the command line. This allows for greater customization and more user control in password generation, especially useful for applications with unique password requirements."
2023-08-05 14:47:30 +02:00
b31219046a
#53 Refactor mode handling and bitmask functions
The naming and handling of mode bitmasks have been refactored for improved code readability and maintainability. The term "Mode" was replaced with "ModeMask" for clarity and all associated functions were renamed accordingly (e.g., "SetMode" to "MaskSetMode"). These changes provide better insight into the function of the code and increase understandability for future development efforts. The command-line utility now also supports specifying modes via the "-M" flag.
2023-08-04 17:14:24 +02:00
ac97b94ec9
Refactor generator and add config options
Refactored the generator to include a new config option, changed function signatures to follow the new structure, and renamed the function 'RandomString' to 'RandomStringFromCharRange' for clarity. Also, added a new mode and algorithm feature to enhance password generation. Furthermore, added several tests for new features and configurations. Adapted the CLI to use the new configuration approach. This refactoring was necessary to improve the customizability and clarity of the password generation process. Fixed minor issues and added '.gitignore' for clean commits in the future.
2023-08-04 16:02:58 +02:00
e94b1ade5c
v2: Complete rework of the library and the client 2023-04-18 11:49:44 +02:00
befa6c2723
Remove old code for the v2 refactor 2023-04-06 12:21:20 +02:00
beb01894cd
Upgrade go-hibp to v1.0.4 and fix the breaking changes 2022-10-29 20:43:22 +02:00
85c828801f
Dockerfile was accidentally forcing GOOS and GOARCH.
For each of use, the version now also prints out OS and ARCH
2022-05-12 10:38:56 +02:00
bb717254f3
Update apg.go
Bump version to 0.4.1
2022-05-11 15:01:48 +02:00
Abraham Ingersoll
81067bdcae
Tiny typo 2022-04-02 20:39:29 +01:00
97412600fd
Update apg.go
Update version to 0.4.0
2021-10-24 21:52:01 +02:00
3e8be112fe
Updated GetChar() method to use a much faster and optimized algorithm 2021-10-24 20:13:37 +02:00
2c23220100
Update apg.go 2021-09-23 19:58:51 +02:00
6047e79e0c Updated CLI usage text to reflect the changes of #27 2021-09-23 16:44:47 +02:00
aeb278355c Minor code cleanups and updated README to reflect #27 2021-09-23 15:48:03 +02:00
45ce66cd30 Make GoLinter happy 2021-09-23 14:42:13 +02:00
fcd148904b Added pronounceable passwords #27 2021-09-23 14:40:52 +02:00
e773db2ee7 Bump version to 0.4.0-dev 2021-09-23 09:35:54 +02:00
27d05f497b Use go-hibp v1.0.0 for #30 2021-09-22 20:23:43 +02:00
2087a4b60c
Implement new go-hibp package 2021-09-21 14:03:09 +02:00
7871b4307b Missing cmd/ 2021-09-21 11:31:39 +02:00