public void SerializeDeserialize() { byte[] serializedBytes = Symmetric.Serialize(plainText); string deserializedValue = Symmetric.Deserialize <string>(serializedBytes); Assert.AreEqual(plainText, deserializedValue); }
public void EncryptDecryptString_AppendIV() { var symmetric = new Symmetric(key); var cipher = symmetric.Encrypt(plainText, iv); var decryptedText = symmetric.Decrypt(cipher); Assert.AreEqual(plainText, Symmetric.Deserialize <string>(decryptedText)); }