/// <summary> /// DES解密 /// </summary> /// <param name="encryptText">密文</param> /// <returns></returns> public static string DecryptStringReverse(string encryptText) { if (IsEncrypt() != Boolean.TrueString) { return(encryptText); } return(EncryptionDES.DecryptStringReverse(encryptText)); }
public void EncipherTest() { uint[] key = new uint[] { 1, 2, 3, 4, 5, 6 }; byte[] expected = new byte[] { 96, 97, 98, 99 }; var encrypter = new EncryptionDES(); byte[] ciphertext = encrypter.Encrypt(expected, key); byte[] actual = encrypter.Decrypt(ciphertext, key); CollectionAssert.AreEqual(expected, actual); }