This commit is contained in:
2025-06-24 15:46:41 +08:00
parent 3833f67b03
commit be63c01987
22 changed files with 1509 additions and 34 deletions

View File

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