From d37446cbb58a1c01c5095af966fbdd8e05bfffbd Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Sat, 29 Apr 2023 18:36:31 +0200 Subject: [PATCH] CryptClient - `tlsOutputHandler(in ubyte[])` now writes to the underlying `RiverStream`, `stream` --- source/cryptstream/streams/client.d | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/cryptstream/streams/client.d b/source/cryptstream/streams/client.d index 8cea592..6c06081 100644 --- a/source/cryptstream/streams/client.d +++ b/source/cryptstream/streams/client.d @@ -33,9 +33,14 @@ public class CryptClient : RiverStream // TODO: Insert code to init using botan OVER `stream` } + // NOTE This gets called when the Botan client needs to write to + // ... the underlying output. So If we were to call `botanClient.send` + // ... (which takes in our plaintext), it would encrypt, and then + // ... push the encrypted payload into this method here below + // ... (implying we should write to our underlying stream here) private void tlsOutputHandler(in ubyte[] dataOut) { - + stream.writeFully(cast(byte[])dataOut); }