| Index: nss/lib/freebl/ctr.c
|
| diff --git a/nss/lib/freebl/ctr.c b/nss/lib/freebl/ctr.c
|
| index d8527602111ff746f5f41aaacf6dd8430e61ece6..1cbf30c288ded2aed6197ce592c63e22e102cd9a 100644
|
| --- a/nss/lib/freebl/ctr.c
|
| +++ b/nss/lib/freebl/ctr.c
|
| @@ -82,7 +82,7 @@ CTR_DestroyContext(CTRContext *ctr, PRBool freeit)
|
| */
|
| static void
|
| ctr_GetNextCtr(unsigned char *counter, unsigned int counterBits,
|
| - unsigned int blocksize)
|
| + unsigned int blocksize)
|
| {
|
| unsigned char *counterPtr = counter + blocksize - 1;
|
| unsigned char mask, count;
|
| @@ -106,7 +106,7 @@ ctr_GetNextCtr(unsigned char *counter, unsigned int counterBits,
|
|
|
| static void
|
| ctr_xor(unsigned char *target, const unsigned char *x,
|
| - const unsigned char *y, unsigned int count)
|
| + const unsigned char *y, unsigned int count)
|
| {
|
| unsigned int i;
|
| for (i=0; i < count; i++) {
|
| @@ -116,9 +116,9 @@ ctr_xor(unsigned char *target, const unsigned char *x,
|
|
|
| SECStatus
|
| CTR_Update(CTRContext *ctr, unsigned char *outbuf,
|
| - unsigned int *outlen, unsigned int maxout,
|
| - const unsigned char *inbuf, unsigned int inlen,
|
| - unsigned int blocksize)
|
| + unsigned int *outlen, unsigned int maxout,
|
| + const unsigned char *inbuf, unsigned int inlen,
|
| + unsigned int blocksize)
|
| {
|
| unsigned int tmp;
|
| SECStatus rv;
|
| @@ -131,7 +131,7 @@ CTR_Update(CTRContext *ctr, unsigned char *outbuf,
|
| *outlen = 0;
|
| if (ctr->bufPtr != blocksize) {
|
| unsigned int needed = PR_MIN(blocksize-ctr->bufPtr, inlen);
|
| - ctr_xor(outbuf, inbuf, ctr->buffer+ctr->bufPtr, needed);
|
| + ctr_xor(outbuf, inbuf, ctr->buffer + ctr->bufPtr, needed);
|
| ctr->bufPtr += needed;
|
| outbuf += needed;
|
| inbuf += needed;
|
| @@ -142,7 +142,7 @@ CTR_Update(CTRContext *ctr, unsigned char *outbuf,
|
| }
|
| PORT_Assert(ctr->bufPtr == blocksize);
|
| }
|
| -
|
| +
|
| while (inlen >= blocksize) {
|
| rv = (*ctr->cipher)(ctr->context, ctr->buffer, &tmp, blocksize,
|
| ctr->counter, blocksize, blocksize);
|
| @@ -190,7 +190,7 @@ CTR_Update_HW_AES(CTRContext *ctr, unsigned char *outbuf,
|
| *outlen = 0;
|
| if (ctr->bufPtr != blocksize) {
|
| unsigned int needed = PR_MIN(blocksize-ctr->bufPtr, inlen);
|
| - ctr_xor(outbuf, inbuf, ctr->buffer+ctr->bufPtr, needed);
|
| + ctr_xor(outbuf, inbuf, ctr->buffer + ctr->bufPtr, needed);
|
| ctr->bufPtr += needed;
|
| outbuf += needed;
|
| inbuf += needed;
|
|
|