package crypter import ( "testing" ) func Test_TripleECBEncrypt(t *testing.T) { key := "7ejGP1WiZkgZ8VaIf6vBOBDFUnmByZiO" // 24字节的密钥 data := "这是测试 This is test!=" // 明文 d, err := TripleECBEncryptForHex(key, data) t.Log(d) t.Log(err) } func Test_TripleECBDecryptFromHex(t *testing.T) { key := "7ejGP1WiZkgZ8VaIf6vBOBDFUnmByZiO" // 24字节的密钥 msg := "0a7d96e2459dfa37cd13b8611acb26dd9adf31016bdb93da0d25d6a8041005e6" // msg = "38142e6afc57a2a70ccaebc906accdf050984102f405fb6b2edcea6f28feb646" data, err := TripleECBDecryptFromHex(key, msg) t.Log(data) t.Log(err) }