diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-07-06 00:35:01 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-07-06 00:35:01 -0400 |
commit | 30b304b0f1f6863926a249fc9824e7dfa41f4dd9 (patch) | |
tree | 74ab6121779c037b273515f9d697bd6f264f443e /rabbit.cpp | |
parent | 97a1e8cae2e94f93c9da16b637a45612af224590 (diff) | |
download | cryptopp-git-30b304b0f1f6863926a249fc9824e7dfa41f4dd9.tar.gz |
Update comments
Diffstat (limited to 'rabbit.cpp')
-rw-r--r-- | rabbit.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -137,8 +137,11 @@ void RabbitPolicy::OperateKeystream(KeystreamOperation operation, byte *output, }
// 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, GetBytesPerIteration() * iterationCount);
}
@@ -235,8 +238,11 @@ void RabbitWithIVPolicy::OperateKeystream(KeystreamOperation operation, byte *ou }
// 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, GetBytesPerIteration() * iterationCount);
}
|