3 ms·
If the message is too large to buffer, one might also first just decrypt and stream the plaintext into sha-1. Once the MDC clears, you can just decrypt again,
by rocqua 9y ago
If the message is too large to buffer, one might also first just decrypt and stream the plaintext into sha-1.
Once the MDC clears, you can just decrypt again, this time writing to stdout.
- tedunangst 9y agoThis is difficult if the input is a nonseekable stream, but that doesn't excuse producing bad output.
- tptacek 9y agoThat's why I didn't suggest it, but to be fair, you could tee the stream into an intermediate file for a two-pass scheme.