It's pretty clearly an oversight. I couldn't find a source to back this up, but as it stands any use case we could imagine (I can't imagine any practical use cases) saves developers at most one line of code. Worse, any developer who (for whatever reason) did want a copy of his own buffer made would probably find it so unlikely that TransformBlock would do this for her that she'd probably write that line of code herself anyway!
outputBuffer is used by other ICryptoTransforms in sensible ways (eg. as an output buffer), so it really should contain - when not null and not overwriting the input buffer - the intermediate digest, especially since it's not otherwise available from the class. (Making the intermediate digest available is a nice idea whenever the input to the algorithm appears in multiple contexts.)
My guess is:
- Someone got it backwards in 1.1 regarding when the IOException should be thrown.
- In 2.0, someone "fixed" that problem, but misread the spec and copied from
inputBuffer instead of this.HashValue.
- Intermediate digests are used so rarely that no one has complained before 4.0.
outputBuffermay actually be set tonullto avoid the copy, and insists that "calling theTransformBlockmethod with different input and output arrays results in anIOException", which is not true.