And here is my solution.
First, I define an XOR function to XOR two-byte arrays together
because that's not included in the library.
Next, we'll loop through the plaintext array.
And here we break it into block-sized pieces,
which then gets XORed and then fed into the encoder.
The encoder output is then saved as the XOR for the input on the next round.
The encoder output is then saved as the XOR
for the next loop and also added to the cipher output.
And finally, the cipher is returned.
