Files
tcpserver-client/utils/EncryptionUtil_test.go
2021-04-30 19:00:29 +08:00

20 lines
380 B
Go

package utils
import (
"fmt"
"testing"
)
// 测试加密解密
func TestEncryptAndDecrypt(t *testing.T) {
password:="1234567890"
enMsg:=encryptMsg("这是一个测试字符串",password)
fmt.Println("加密后字符串:"+enMsg)
deMsg:=decryptMsg(enMsg,password)
fmt.Println("解密后字符串:"+deMsg)
}
//// 测试解密
//func TestDecrypt(t *testing.T) {
//
//}