diff options
author | Jeffrey Walton <noloader@gmail.com> | 2018-12-27 17:47:20 -0500 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-12-27 17:47:20 -0500 |
commit | 5ace5e478add7e1f0d73503f649fa27376829740 (patch) | |
tree | 08504eb5ff2f69fe749b872ff56716614e8a8f98 /filters.cpp | |
parent | b877782692400a4d1492e4eb13e576ee8f5610ab (diff) | |
download | cryptopp-git-5ace5e478add7e1f0d73503f649fa27376829740.tar.gz |
Spelling corrections
Diffstat (limited to 'filters.cpp')
-rw-r--r-- | filters.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/filters.cpp b/filters.cpp index ed24be5d..c07e912c 100644 --- a/filters.cpp +++ b/filters.cpp @@ -694,12 +694,13 @@ void StreamTransformationFilter::NextPutModifiable(byte *inString, size_t length void StreamTransformationFilter::LastPut(const byte *inString, size_t length)
{
- // This block is new to StreamTransformationFilter. It somewhat of a hack and was added
- // for OCB mode; see GitHub Issue 515. The rub with OCB is, its a block cipher and the
- // last block size can be 0. However, "last block = 0" is not the 0 predacted in the
- // original code. In the orginal code 0 means "nothing special" so DEFAULT_PADDING is
- // applied. OCB's 0 literally means a final block size can be 0 or non-0; and no padding
- // is needed in either case because OCB has its own scheme (see handling of P_* and A_*).
+ // This block is new to StreamTransformationFilter. It is somewhat of a hack and was
+ // added for OCB mode; see GitHub Issue 515. The rub with OCB is, its a block cipher
+ // and the last block size can be 0. However, "last block = 0" is not the 0 predicated
+ // in the original code. In the orginal code 0 means "nothing special" so
+ // DEFAULT_PADDING is applied. OCB's 0 literally means a final block size can be 0 or
+ // non-0; and no padding is needed in either case because OCB has its own scheme (see
+ // handling of P_* and A_*).
// Stream ciphers have policy objects to convey how to operate the cipher. The Crypto++
// framework operates well when MinLastBlockSize() is 1. However, it did not appear to
// cover the OCB case either because we can't stream OCB. It needs full block sizes. In
@@ -712,7 +713,7 @@ void StreamTransformationFilter::LastPut(const byte *inString, size_t length) // In some respect we have already hit the need for more information. For example, OCB
// calculates the checksum on the cipher text at the same time, so we don't need the
// disjoint behavior of calling "EncryptBlock" followed by a separate "AuthenticateBlock".
- // Additional information may allow us to avoid the two spearate calls.
+ // Additional information may allow us to avoid the two separate calls.
if (m_isSpecial)
{
const size_t leftOver = length % m_mandatoryBlockSize;
|