bindbox-game/internal/pkg/utils/utils_test.go
2025-10-16 13:28:24 +08:00

31 lines
700 B
Go

package utils
import (
"fmt"
"testing"
"time"
)
func TestGenerateAdminHashedPassword(t *testing.T) {
t.Log(MD5("admin2025"))
t.Log(GenerateAdminHashedPassword(MD5("admin2025")))
}
func TestGenerateDoctorHashedPassword(t *testing.T) {
t.Log(MD5("doctor2025"))
t.Log(GenerateDoctorHashedPassword(MD5("doctor2025")))
}
func TestGeneratePatientHashedPassword(t *testing.T) {
t.Log(MD5("patient2025"))
t.Log(GeneratePatientHashedPassword(MD5("patient2025")))
}
func TestXorEncrypt(t *testing.T) {
t.Log(XorEncrypt(fmt.Sprintf("%s%d", "13800000001", time.Now().Local().Unix()), "999999"))
}
func TestXorDecrypt(t *testing.T) {
t.Log(XorDecrypt("CAoBCQkJCQkJCQgIDgwKAQwKCg8B", "999999"))
}