Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: nss/lib/freebl/ctr.c

Issue 319593003: Update to NSS 3.16.2 Beta 3. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Remove unused function SEC_NumberOrNameStringToOIDTag Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698