Related to this question encrypt binary with 7z without filenames?
In C# how can i put binary in STDin? i was hoping the below would work but it doesnt. And it makes sense. So how do i push a byte[] array?
new BinaryWriter(p.StandardInput.FormatProvider);
Write directly to the base stream:
stdin
is just another byte stream, one your program can read frometc. In the q. which you refer to, the material coming in from
stdin
is being piped from the output of another program. To do that part of the process, you useConsole.OpenStandardOuput()
to get a stream and push the binary out through that.