手机号适配双端

This commit is contained in:
2025-06-18 16:31:32 +08:00
parent a738c711de
commit 301a80447d
39 changed files with 1423 additions and 1348 deletions

View File

@@ -9,7 +9,7 @@ import (
func TestAesEcbMobileEncryption(t *testing.T) {
// 测试手机号加密
mobile := "13280082033 "
mobile := "17776203797 "
key := []byte("ff83609b2b24fc73196aac3d3dfb874f") // 16字节AES-128密钥
keyStr := hex.EncodeToString(key)
@@ -19,7 +19,7 @@ func TestAesEcbMobileEncryption(t *testing.T) {
t.Fatalf("手机号加密失败: %v", err)
}
fmt.Printf("encrypted: %s\n", encrypted)
jmStr := "oEpLcrIpDPN63rOlESXTDg=="
jmStr := "m9EEeW9ZBBJmi1hx1k1uIQ=="
// 测试解密
decrypted, err := DecryptMobile(jmStr, keyStr)
if err != nil {