summaryrefslogtreecommitdiff
path: root/rabbit.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 /rabbit.cpp
parent97a1e8cae2e94f93c9da16b637a45612af224590 (diff)
downloadcryptopp-git-30b304b0f1f6863926a249fc9824e7dfa41f4dd9.tar.gz
Update comments
Diffstat (limited to 'rabbit.cpp')
-rw-r--r--rabbit.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/rabbit.cpp b/rabbit.cpp
index f2189b45..7e29526c 100644
--- a/rabbit.cpp
+++ b/rabbit.cpp
@@ -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);
}