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

Side by Side Diff: nss/lib/freebl/sha_fast.c

Issue 16132005: Allow NSS to be built with NO_NSPR_10_SUPPORT. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss/lib/freebl/sha512.c ('k') | nss/lib/freebl/unix_rand.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 4
5 #ifdef FREEBL_NO_DEPEND 5 #ifdef FREEBL_NO_DEPEND
6 #include "stubs.h" 6 #include "stubs.h"
7 #endif 7 #endif
8 8
9 #include <memory.h> 9 #include <memory.h>
10 #include "blapi.h" 10 #include "blapi.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 void 398 void
399 SHA1_DestroyContext(SHA1Context *cx, PRBool freeit) 399 SHA1_DestroyContext(SHA1Context *cx, PRBool freeit)
400 { 400 {
401 memset(cx, 0, sizeof *cx); 401 memset(cx, 0, sizeof *cx);
402 if (freeit) { 402 if (freeit) {
403 PORT_Free(cx); 403 PORT_Free(cx);
404 } 404 }
405 } 405 }
406 406
407 SECStatus 407 SECStatus
408 SHA1_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) 408 SHA1_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length)
409 { 409 {
410 SHA1Context ctx; 410 SHA1Context ctx;
411 unsigned int outLen; 411 unsigned int outLen;
412 412
413 SHA1_Begin(&ctx); 413 SHA1_Begin(&ctx);
414 SHA1_Update(&ctx, src, src_length); 414 SHA1_Update(&ctx, src, src_length);
415 SHA1_End(&ctx, dest, &outLen, SHA1_LENGTH); 415 SHA1_End(&ctx, dest, &outLen, SHA1_LENGTH);
416 memset(&ctx, 0, sizeof ctx); 416 memset(&ctx, 0, sizeof ctx);
417 return SECSuccess; 417 return SECSuccess;
418 } 418 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 void SHA1_Clone(SHA1Context *dest, SHA1Context *src) 454 void SHA1_Clone(SHA1Context *dest, SHA1Context *src)
455 { 455 {
456 memcpy(dest, src, sizeof *dest); 456 memcpy(dest, src, sizeof *dest);
457 } 457 }
458 458
459 void 459 void
460 SHA1_TraceState(SHA1Context *ctx) 460 SHA1_TraceState(SHA1Context *ctx)
461 { 461 {
462 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); 462 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
463 } 463 }
OLDNEW
« no previous file with comments | « nss/lib/freebl/sha512.c ('k') | nss/lib/freebl/unix_rand.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698