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

Side by Side Diff: source/libvpx/md5_utils.c

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 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
« no previous file with comments | « source/libvpx/libs.mk ('k') | source/libvpx/test/convolve_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This code implements the MD5 message-digest algorithm. 2 * This code implements the MD5 message-digest algorithm.
3 * The algorithm is due to Ron Rivest. This code was 3 * The algorithm is due to Ron Rivest. This code was
4 * written by Colin Plumb in 1993, no copyright is claimed. 4 * written by Colin Plumb in 1993, no copyright is claimed.
5 * This code is in the public domain; do with it what you wish. 5 * This code is in the public domain; do with it what you wish.
6 * 6 *
7 * Equivalent code is available from RSA Data Security, Inc. 7 * Equivalent code is available from RSA Data Security, Inc.
8 * This code has been tested against that, and is equivalent, 8 * This code has been tested against that, and is equivalent,
9 * except that you don't need to include two pages of legalese 9 * except that you don't need to include two pages of legalese
10 * with every copy. 10 * with every copy.
11 * 11 *
12 * To compute the message digest of a chunk of bytes, declare an 12 * To compute the message digest of a chunk of bytes, declare an
13 * MD5Context structure, pass it to MD5Init, call MD5Update as 13 * MD5Context structure, pass it to MD5Init, call MD5Update as
14 * needed on buffers full of bytes, and then call MD5Final, which 14 * needed on buffers full of bytes, and then call MD5Final, which
15 * will fill a supplied 16-byte array with the digest. 15 * will fill a supplied 16-byte array with the digest.
16 * 16 *
17 * Changed so as no longer to depend on Colin Plumb's `usual.h' header 17 * Changed so as no longer to depend on Colin Plumb's `usual.h' header
18 * definitions 18 * definitions
19 * - Ian Jackson <ian@chiark.greenend.org.uk>. 19 * - Ian Jackson <ian@chiark.greenend.org.uk>.
20 * Still in the public domain. 20 * Still in the public domain.
21 */ 21 */
22 22
23 #include <string.h> /* for memcpy() */ 23 #include <string.h> /* for memcpy() */
24 24
25 #include "md5_utils.h" 25 #include "md5_utils.h"
26 26
27 void 27 static void
28 byteSwap(UWORD32 *buf, unsigned words) { 28 byteSwap(UWORD32 *buf, unsigned words) {
29 md5byte *p; 29 md5byte *p;
30 30
31 /* Only swap bytes for big endian machines */ 31 /* Only swap bytes for big endian machines */
32 int i = 1; 32 int i = 1;
33 33
34 if (*(char *)&i == 1) 34 if (*(char *)&i == 1)
35 return; 35 return;
36 36
37 p = (md5byte *)buf; 37 p = (md5byte *)buf;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); 232 MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
233 MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); 233 MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
234 234
235 buf[0] += a; 235 buf[0] += a;
236 buf[1] += b; 236 buf[1] += b;
237 buf[2] += c; 237 buf[2] += c;
238 buf[3] += d; 238 buf[3] += d;
239 } 239 }
240 240
241 #endif 241 #endif
OLDNEW
« no previous file with comments | « source/libvpx/libs.mk ('k') | source/libvpx/test/convolve_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698