public void EncryptBase64StringTest() { string decryptString = "验证此测试方法的正确性。"; string expected = AesSecurity.EncryptBase64String(decryptString); string actual = AesSecurity.DecryptBase64String(expected); Assert.AreEqual(decryptString, actual); }
public void DecryptBase64StringTest1() { string decryptString = "验证此测试方法的正确性。"; string decryptKey = "Abcdendk"; decryptKey = decryptKey.PadLeft(32, 'F'); string expected = AesSecurity.EncryptBase64String(decryptString, decryptKey); string actual = AesSecurity.DecryptBase64String(expected, decryptKey); Assert.AreEqual(decryptString, actual); }