21 lines
416 B
Go
21 lines
416 B
Go
package utils
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestGenerateAdminHashedPassword(t *testing.T) {
|
|
t.Log(MD5("chat2025"))
|
|
t.Log(GenerateAdminHashedPassword(MD5("chat2025")))
|
|
}
|
|
|
|
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"))
|
|
}
|