updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+5 -6
View File
@@ -1,7 +1,6 @@
package cryptext
import (
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
"git.blackforestbytes.com/BlackForestBytes/goext/totpext"
"git.blackforestbytes.com/BlackForestBytes/goext/tst"
"testing"
@@ -32,7 +31,7 @@ func TestPassHashTOTP(t *testing.T) {
tst.AssertFalse(t, ph.Verify("test123", nil))
tst.AssertFalse(t, ph.Verify("test124", nil))
tst.AssertTrue(t, ph.Verify("test123", langext.Ptr(totpext.TOTP(sec))))
tst.AssertTrue(t, ph.Verify("test123", new(totpext.TOTP(sec))))
tst.AssertFalse(t, ph.Verify("test124", nil))
}
@@ -141,7 +140,7 @@ func TestPassHashUpgrade_V3_TOTP(t *testing.T) {
tst.AssertFalse(t, ph.Verify("test123", nil))
tst.AssertFalse(t, ph.Verify("test124", nil))
tst.AssertTrue(t, ph.Verify("test123", langext.Ptr(totpext.TOTP(sec))))
tst.AssertTrue(t, ph.Verify("test123", new(totpext.TOTP(sec))))
tst.AssertFalse(t, ph.Verify("test124", nil))
ph, err = ph.Upgrade("test123")
@@ -153,7 +152,7 @@ func TestPassHashUpgrade_V3_TOTP(t *testing.T) {
tst.AssertFalse(t, ph.Verify("test123", nil))
tst.AssertFalse(t, ph.Verify("test124", nil))
tst.AssertTrue(t, ph.Verify("test123", langext.Ptr(totpext.TOTP(sec))))
tst.AssertTrue(t, ph.Verify("test123", new(totpext.TOTP(sec))))
tst.AssertFalse(t, ph.Verify("test124", nil))
}
@@ -193,7 +192,7 @@ func TestPassHashUpgrade_V4_TOTP(t *testing.T) {
tst.AssertFalse(t, ph.Verify("test123", nil))
tst.AssertFalse(t, ph.Verify("test124", nil))
tst.AssertTrue(t, ph.Verify("test123", langext.Ptr(totpext.TOTP(sec))))
tst.AssertTrue(t, ph.Verify("test123", new(totpext.TOTP(sec))))
tst.AssertFalse(t, ph.Verify("test124", nil))
ph, err = ph.Upgrade("test123")
@@ -205,6 +204,6 @@ func TestPassHashUpgrade_V4_TOTP(t *testing.T) {
tst.AssertFalse(t, ph.Verify("test123", nil))
tst.AssertFalse(t, ph.Verify("test124", nil))
tst.AssertTrue(t, ph.Verify("test123", langext.Ptr(totpext.TOTP(sec))))
tst.AssertTrue(t, ph.Verify("test123", new(totpext.TOTP(sec))))
tst.AssertFalse(t, ph.Verify("test124", nil))
}
+3 -3
View File
@@ -7,21 +7,21 @@ import (
)
func TestPronouncablePasswordExt(t *testing.T) {
for i := 0; i < 20; i++ {
for i := range 20 {
pw, entropy := PronouncablePasswordExt(rand.New(rand.NewSource(int64(i))), 16)
fmt.Printf("[%.2f] => %s\n", entropy, pw)
}
}
func TestPronouncablePasswordSeeded(t *testing.T) {
for i := 0; i < 20; i++ {
for i := range 20 {
pw := PronouncablePasswordSeeded(int64(i), 8)
fmt.Printf("%s\n", pw)
}
}
func TestPronouncablePassword(t *testing.T) {
for i := 0; i < 20; i++ {
for i := range 20 {
pw := PronouncablePassword(i + 1)
fmt.Printf("%s\n", pw)
}