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

Side by Side Diff: src/platform/vboot_reference/vboot_firmware/lib/cryptolib/sha1.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 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * SHA-1 implementation largely based on libmincrypt in the the Android 5 * SHA-1 implementation largely based on libmincrypt in the the Android
6 * Open Source Project (platorm/system/core.git/libmincrypt/sha.c 6 * Open Source Project (platorm/system/core.git/libmincrypt/sha.c
7 */ 7 */
8 8
9 #include "cryptolib.h" 9 #include "cryptolib.h"
10 #include "utility.h" 10 #include "utility.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 int i; 281 int i;
282 SHA1_CTX ctx; 282 SHA1_CTX ctx;
283 SHA1_init(&ctx); 283 SHA1_init(&ctx);
284 SHA1_update(&ctx, data, len); 284 SHA1_update(&ctx, data, len);
285 p = SHA1_final(&ctx); 285 p = SHA1_final(&ctx);
286 for (i = 0; i < SHA1_DIGEST_SIZE; ++i) { 286 for (i = 0; i < SHA1_DIGEST_SIZE; ++i) {
287 digest[i] = *p++; 287 digest[i] = *p++;
288 } 288 }
289 return digest; 289 return digest;
290 } 290 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698