methodTstCustomCipherComponent.DecryptStreamToDst
function DecryptStreamToDst(aBuf: tStream; Count: Integer): Integer;
Convenience wrapper that reads Count octets from aBuf (a stream) in BufferSize-sized chunks and feeds each chunk through DecryptToDst; pass Count = 0 to decrypt from stream position 0, or a negative Count to decrypt from the current position to the end. An application uses this to decrypt a whole file/stream without manually chunking it (still needs a final DoneToDst call). An empty source is passed on as one DecryptToDst call of 0 octets, so that DoneToDst knows it is decrypting: it refuses the empty input where a tag or a padded block is due, and accepts it as the empty message in CTR, CFB, OFB and bpmNone.