summaryrefslogtreecommitdiff
path: root/hc256.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-07-06 00:35:01 -0400
committerJeffrey Walton <noloader@gmail.com>2018-07-06 00:35:01 -0400
commit30b304b0f1f6863926a249fc9824e7dfa41f4dd9 (patch)
tree74ab6121779c037b273515f9d697bd6f264f443e /hc256.cpp
parent97a1e8cae2e94f93c9da16b637a45612af224590 (diff)
downloadcryptopp-git-30b304b0f1f6863926a249fc9824e7dfa41f4dd9.tar.gz
Update comments
Diffstat (limited to 'hc256.cpp')
-rw-r--r--hc256.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/hc256.cpp b/hc256.cpp
index 1cdc0cb2..d7c47fd8 100644
--- a/hc256.cpp
+++ b/hc256.cpp
@@ -100,8 +100,11 @@ void HC256Policy::OperateKeystream(KeystreamOperation operation, byte *output, c
PutWord(false, LITTLE_ENDIAN_ORDER, out, Generate());
// If AdditiveCipherTemplate does not have an accumulated keystream
- // then it will ask OperateKeystream to XOR the plaintext with
- // the keystream and write it to the ciphertext buffer.
+ // then it will ask OperateKeystream to generate one. Optionally it
+ // will ask for an XOR of the input with the keystream while
+ // writing the result to the output buffer. In all cases the
+ // output buffer is written. The optional part is adding the
+ // input buffer and keystream.
if ((operation & INPUT_NULL) != INPUT_NULL)
xorbuf(output, input, msglen);
}