feat(security)!: Remove deprecated SHA512 parameter for password hashing

This commit is contained in:
TwiN committed 2022-06-14 23:48:28 -04:00
1 parent 6f3150d936
commit c873b0ba0c
7 files changed
+5 -96

No files matched your search

-20
View File
@@ -2,26 +2,6 @@ package security
import "testing"
func TestBasicConfig_IsValidUsingSHA512(t *testing.T) {
basicConfig := &BasicConfig{
Username: "admin",
PasswordSha512Hash: Sha512("test"),
}
if !basicConfig.isValid() {
t.Error("basicConfig should've been valid")
}
}
func TestBasicConfig_IsValidWhenPasswordIsInvalidUsingSHA512(t *testing.T) {
basicConfig := &BasicConfig{
Username: "admin",
PasswordSha512Hash: "",
}
if basicConfig.isValid() {
t.Error("basicConfig shouldn't have been valid")
}
}
func TestBasicConfig_IsValidUsingBcrypt(t *testing.T) {
basicConfig := &BasicConfig{
Username: "admin",