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

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

Issue 10961060: Update NSS to NSS 3.14 Beta 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Add the NSS snapshot timestamp to README.chromium and nss-checkout.sh Created 8 years, 2 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 | « mozilla/security/nss/lib/freebl/sha512.c ('k') | mozilla/security/nss/lib/freebl/shvfy.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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 SECStatus 390 SECStatus
391 SHA1_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length) 391 SHA1_HashBuf(unsigned char *dest, const unsigned char *src, uint32 src_length)
392 { 392 {
393 SHA1Context ctx; 393 SHA1Context ctx;
394 unsigned int outLen; 394 unsigned int outLen;
395 395
396 SHA1_Begin(&ctx); 396 SHA1_Begin(&ctx);
397 SHA1_Update(&ctx, src, src_length); 397 SHA1_Update(&ctx, src, src_length);
398 SHA1_End(&ctx, dest, &outLen, SHA1_LENGTH); 398 SHA1_End(&ctx, dest, &outLen, SHA1_LENGTH);
399 memset(&ctx, 0, sizeof ctx);
399 return SECSuccess; 400 return SECSuccess;
400 } 401 }
401 402
402 /* Hash a null-terminated character string. */ 403 /* Hash a null-terminated character string. */
403 SECStatus 404 SECStatus
404 SHA1_Hash(unsigned char *dest, const char *src) 405 SHA1_Hash(unsigned char *dest, const char *src)
405 { 406 {
406 return SHA1_HashBuf(dest, (const unsigned char *)src, PORT_Strlen (src)); 407 return SHA1_HashBuf(dest, (const unsigned char *)src, PORT_Strlen (src));
407 } 408 }
408 409
(...skipping 27 matching lines...) Expand all
436 void SHA1_Clone(SHA1Context *dest, SHA1Context *src) 437 void SHA1_Clone(SHA1Context *dest, SHA1Context *src)
437 { 438 {
438 memcpy(dest, src, sizeof *dest); 439 memcpy(dest, src, sizeof *dest);
439 } 440 }
440 441
441 void 442 void
442 SHA1_TraceState(SHA1Context *ctx) 443 SHA1_TraceState(SHA1Context *ctx)
443 { 444 {
444 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); 445 PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
445 } 446 }
OLDNEW
« no previous file with comments | « mozilla/security/nss/lib/freebl/sha512.c ('k') | mozilla/security/nss/lib/freebl/shvfy.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698