Commit graph

7 commits

Author SHA1 Message Date
5c8b2fc371
Update character set and bit size for secure string generation
Revised the character set to include a larger variety of symbols and adjusted the bit size calculations to correspond with the new set size. This ensures more efficient and secure random string generation by effectively utilizing the bitmask.
2024-10-07 15:03:07 +02:00
cd90c3ddf3
Update randNum function and documentation for multiple versions
Expanded randNum function comments to provide detailed behavior and usage across different Go versions. Enhanced the randomStringSecure function doc to explain its cryptographic secure implementation and error handling.
2024-10-06 17:00:49 +02:00
19330fc108
Refactor random number generation and add version-specific implementations
Removed error handling from `randNum` in `random_test.go` and introduced new `randNum` implementations for different Go versions (1.19, 1.20-1.21, 1.22+). This ensures compatibility with different versions of Go and utilizes the appropriate version-specific random number generation methods. We are using math/rand instead crypto/rand. For our needs this should be sufficient.
2024-09-20 20:30:23 +02:00
514e68be54
Update variable name in random.go
Changed the abbreviation 'idx' to 'i' in the 'random.go' file. This change makes the variable roles much clearer and aligns the naming with Go's best practice, enhancing readability and maintainability.
2024-02-27 11:43:05 +01:00
7de4f5053f
Refactor variable names for better clarity
Adjusted variable names in several functions and improved code readability. Full, descriptive names have replaced abbreviations to make the codes self-explanatory. The change is aimed at enhancing code maintenance and adhering to Go's best practices for naming conventions.
2024-02-27 11:30:09 +01:00
3922d3f195
Switched copyright header from me to "The go-mail Authors" 2023-01-15 16:14:19 +01:00
8484e557d0
Replace math/rand with crypto/rand
Since the Windows tests were still failing, we are replacing the random number generation with math/rand with random string generation via crypto/rand
2022-10-26 14:05:25 +02:00