Unhandled exception. System.Security.Cryptography.CryptographicException: The input data is not a complete block.
at System.Security.Cryptography.SymmetricPadding.GetCiphertextLength(Int32 plaintextLength, Int32 paddingSizeInBytes, PaddingMode paddingMode)
at System.Security.Cryptography.UniversalCryptoEncryptor.UncheckedTransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlockAsync(Boolean useAsync, CancellationToken cancellationToken)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamWriter.CloseStreamFromDispose(Boolean disposing)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at Program.Encrypt(Int32 key, String plainText, Int32 iv)
at Program.Encrypt(Int32 key, String plainText, Int32 iv)
at Program.Main()
Command terminated by signal 6