Commit graph

13 commits

Author SHA1 Message Date
9bb78748be
Add test for excluded characters in config
A new unit test has been added to verify GetCharRangeFromConfig() function. The test ensures that the function properly excludes configured characters from the generated range.
2024-03-14 21:39:48 +01:00
83e910bdda
Update min character options and remove HIBP check
We've added new configuration options for setting minimum counts of lowercase, numeric, special, and uppercase characters in passwords. The HIBP check feature has also been removed due to redundancy. Note: High values for these character minimums may lead to long calculation times.
2024-03-13 21:23:56 +01:00
239501e83b
Refactor error formatting and update Go version in linter config
Reformatted error messages to use %w for improved error handling in "random.go", and updated the used Go version in the ".golangci.toml" file. Also, removed some unnecessary lines in "random_test.go" and improved the layout of an array in "koremutake.go".
2024-03-12 21:23:15 +01:00
79f921f9ad
Add .gitgnore and SPDX headers in several files
This commit introduces the .gitignore configuration file and adds SPDX headers to several files including test and documentation files. The headers provide license information in a standardized format which can be easily picked up by automated tools for license compliance checks. Additionally, it deleted a .idea/.gitignore file, which is a project specific IDE configuration file not necessary for the repository. It also introduced a README.md file providing more insightful information about the project.
2024-03-12 20:59:07 +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
90ff88de41
Implement additional tests for password generation functionality
In this commit, several new tests have been introduced into random_test.go. These include cases for generating pronounceable passwords, testing minimum requirement conditions, and checking different password algorithms. This provides more comprehensive testing coverage and confirms the expected functionality of password generator methods.
2024-03-12 17:49:26 +01:00
8cb702c932
Add password length and coin flip tests in random_test.go
Added detailed test cases for handling password length and coin flip functionality in random_test.go. These additional unit tests cover various conditions for password lengths, and ensure that 'generateCoinFlip' behaves as expected across multiple invocations.
2024-03-12 16:57:48 +01:00
2973ff4c39
Remove unnecessary comments in random_test.go
Removed redundant comments in random_test.go, specifically in TestGetCharRangeFromConfig function. This change simplifies and tidies the code, while maintaining its comprehensibility and the clarity of the test cases structure.
2024-03-12 16:43:20 +01:00
45b45919c1
Add TestGetCharRangeFromConfig function in random_test.go
A comprehensive unit test, TestGetCharRangeFromConfig, has been added to the random_test.go file. This test validates the GetCharRangeFromConfig function across various scenarios and configurations. It also improves code reliability and makes the application more robust against potential issues.
2024-03-12 12:14:36 +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
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
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