Prepare for release v0.3.1

This commit is contained in:
2025-04-21 12:17:38 -04:00
parent 1dff1f463a
commit 8f23589459
4 changed files with 37 additions and 11 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ var (
)
const (
LibmuttonVersion = "0.3.B" // Untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
LibmuttonVersion = "0.3.1" // Untagged releases feature a letter suffix corresponding to the eventual release version, e.g "0.2.A" -> "0.2.0", "0.2.B" -> "0.2.1"
FSSpace = "\u259d" // ▝ Space/list separator
FSPath = "\u259e" // ▞ Path separator
+4 -4
View File
@@ -131,7 +131,7 @@ func EntryAddPrecheck(targetLocation string) uint8 {
// StringGen generates a random string of a specified length and complexity.
// Requires: complexity (minimum percentage of special characters to be returned in the generated string; set to 0 to generate a simple string),
// complexCharsetLevel (0 = safe for filenames, 1 = safe for most password entries, 2 = safe only for well-made password entries)
// complexCharsetLevel (1 = safe for filenames, 2 = safe for most password entries, 3 = safe only for well-made password entries)
func StringGen(length int, complexity float64, complexCharsetLevel uint8) string {
var actualSpecialChars int // track the number of special characters in the generated string
var minSpecialChars int // track the minimum number of special characters to accept
@@ -145,11 +145,11 @@ func StringGen(length int, complexity float64, complexCharsetLevel uint8) string
if complexity > 0 {
minSpecialChars = int(math.Round(float64(length) * complexity)) // determine minimum number of special characters to accept
switch complexCharsetLevel {
case 0:
extendedCharset = extendedCharsetFiles
case 1:
extendedCharset = extendedCharsetMostPassword + extendedCharsetFiles[:len(extendedCharsetFiles)-9]
extendedCharset = extendedCharsetFiles
case 2:
extendedCharset = extendedCharsetMostPassword + extendedCharsetFiles[:len(extendedCharsetFiles)-9]
case 3:
extendedCharset = extendedCharsetFiles + extendedCharsetMostPassword + extendedCharsetSpecialPassword
}
charset += extendedCharset