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

Side by Side Diff: src/platform/vboot_reference/vboot_firmware/lib/cryptolib/sha2.c

Issue 2219004: Rearrange vboot_reference directories to isolate external components. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 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
OLDNEW
1 /* SHA-256 and SHA-512 implementation based on code by Oliver Gay 1 /* SHA-256 and SHA-512 implementation based on code by Oliver Gay
2 * <olivier.gay@a3.epfl.ch> under a BSD-style license. See below. 2 * <olivier.gay@a3.epfl.ch> under a BSD-style license. See below.
3 */ 3 */
4 4
5 /* 5 /*
6 * FIPS 180-2 SHA-224/256/384/512 implementation 6 * FIPS 180-2 SHA-224/256/384/512 implementation
7 * Last update: 02/02/2007 7 * Last update: 02/02/2007
8 * Issue date: 04/30/2005 8 * Issue date: 04/30/2005
9 * 9 *
10 * Copyright (C) 2005, 2007 Olivier Gay <olivier.gay@a3.epfl.ch> 10 * Copyright (C) 2005, 2007 Olivier Gay <olivier.gay@a3.epfl.ch>
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 int i; 614 int i;
615 SHA512_CTX ctx; 615 SHA512_CTX ctx;
616 SHA512_init(&ctx); 616 SHA512_init(&ctx);
617 SHA512_update(&ctx, data, len); 617 SHA512_update(&ctx, data, len);
618 p = SHA512_final(&ctx); 618 p = SHA512_final(&ctx);
619 for (i = 0; i < SHA512_DIGEST_SIZE; ++i) { 619 for (i = 0; i < SHA512_DIGEST_SIZE; ++i) {
620 digest[i] = *p++; 620 digest[i] = *p++;
621 } 621 }
622 return digest; 622 return digest;
623 } 623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698