public void DecryptByDesTest() { string content = "123456789"; Encoding getByteFunc = Encoding.UTF8; string rgbKey = "abcdefgj"; string rgbIv = "~!@#$%^&"; var actual = DesHelper.EncryptByDes(content, getByteFunc, rgbKey, rgbIv); var target = DesHelper.DecryptByDes(actual, getByteFunc, rgbKey, rgbIv); var tar = getByteFunc.GetString(target); Assert.AreEqual(content, tar); }