public void Test1() { byte[] bytes = new byte[] { 01, 02, 03, 04, 05, 06, 07 }; IJT809Encrypt jT809Encrypt = new JT809EncryptImpl(); var data = jT809Encrypt.Encrypt(bytes, options, 256178).ToHexString(); //"D3 4C 70 78 A7 3A 41" }
public void Test2() { byte[] bytes = "D3 4C 70 78 A7 3A 41".ToHexBytes(); IJT809Encrypt jT809Encrypt = new JT809EncryptImpl(); var data = jT809Encrypt.Decrypt(bytes, options, 256178); Assert.Equal(new byte[] { 01, 02, 03, 04, 05, 06, 07 }, data); }