fix GeneralUserToken

This commit is contained in:
2025-06-18 17:58:40 +08:00
parent f2921c91a1
commit 184d61a5c7
3 changed files with 8 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import (
func TestAesEcbMobileEncryption(t *testing.T) {
// 测试手机号加密
mobile := "15008098853"
mobile := "18889793585"
keyStr := "ff83609b2b24fc73196aac3d3dfb874f"
// 测试加密
@@ -18,8 +18,9 @@ func TestAesEcbMobileEncryption(t *testing.T) {
t.Fatalf("手机号加密失败: %v", err)
}
fmt.Println(encrypted)
jmstr := "m9EEeW9ZBBJmi1hx1k1uIQ=="
// 测试解密
decrypted, err := DecryptMobile(encrypted, keyStr)
decrypted, err := DecryptMobile(jmstr, keyStr)
if err != nil {
t.Fatalf("手机号解密失败: %v", err)
}