2 * Copyright © 2000 Keith Packard
3 * Copyright © 2005 Patrick Lam
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that
8 * copyright notice and this permission notice appear in supporting
9 * documentation, and that the name of Keith Packard not be used in
10 * advertising or publicity pertaining to distribution of the software without
11 * specific, written prior permission. Keith Packard makes no
12 * representations about the suitability of this software for any purpose. It
13 * is provided "as is" without express or implied warranty.
15 * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17 * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21 * PERFORMANCE OF THIS SOFTWARE.
25 #include "../fc-arch/fcarch.h"
30 #include <sys/types.h>
31 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
33 # include <sys/mman.h>
48 static void MD5Init(struct MD5Context
*ctx
);
49 static void MD5Update(struct MD5Context
*ctx
, unsigned char *buf
, unsigned len
);
50 static void MD5Final(unsigned char digest
[16], struct MD5Context
*ctx
);
51 static void MD5Transform(FcChar32 buf
[4], FcChar32 in
[16]);
53 #define CACHEBASE_LEN (1 + 32 + 1 + sizeof (FC_ARCHITECTURE) + sizeof (FC_CACHE_SUFFIX))
55 static const char bin2hex
[] = { '0', '1', '2', '3',
61 FcDirCacheBasename (const FcChar8
* dir
, FcChar8 cache_base
[CACHEBASE_LEN
])
63 unsigned char hash
[16];
66 struct MD5Context ctx
;
69 MD5Update (&ctx
, (unsigned char *)dir
, strlen ((char *) dir
));
71 MD5Final (hash
, &ctx
);
74 hex_hash
= cache_base
+ 1;
75 for (cnt
= 0; cnt
< 16; ++cnt
)
77 hex_hash
[2*cnt
] = bin2hex
[hash
[cnt
] >> 4];
78 hex_hash
[2*cnt
+1] = bin2hex
[hash
[cnt
] & 0xf];
81 strcat ((char *) cache_base
, "-" FC_ARCHITECTURE FC_CACHE_SUFFIX
);
87 FcDirCacheUnlink (const FcChar8
*dir
, FcConfig
*config
)
89 FcChar8
*cache_hashed
= NULL
;
90 FcChar8 cache_base
[CACHEBASE_LEN
];
94 FcDirCacheBasename (dir
, cache_base
);
96 list
= FcStrListCreate (config
->cacheDirs
);
100 while ((cache_dir
= FcStrListNext (list
)))
102 cache_hashed
= FcStrPlus (cache_dir
, cache_base
);
105 (void) unlink ((char *) cache_hashed
);
107 FcStrListDone (list
);
108 /* return FcFalse if something went wrong */
115 FcCacheReadDirs (FcConfig
* config
,
116 FcStrList
*list
, FcFontSet
* set
, FcStrSet
*processed_dirs
)
124 * Read in the results from 'list'.
126 while ((dir
= FcStrListNext (list
)))
128 if (!FcConfigAcceptFilename (config
, dir
))
131 /* Skip this directory if already updated
132 * to avoid the looped directories via symlinks
133 * Clearly a dir not in fonts.conf shouldn't be globally cached.
136 if (FcStrSetMember (processed_dirs
, dir
))
138 if (!FcStrSetAdd (processed_dirs
, dir
))
141 subdirs
= FcStrSetCreate ();
144 fprintf (stderr
, "Can't create directory set\n");
149 FcDirScanConfig (set
, subdirs
,
150 config
->blanks
, dir
, FcFalse
, config
);
152 sublist
= FcStrListCreate (subdirs
);
153 FcStrSetDestroy (subdirs
);
156 fprintf (stderr
, "Can't create subdir list in \"%s\"\n", dir
);
160 ret
+= FcCacheReadDirs (config
, sublist
, set
, processed_dirs
);
162 FcStrListDone (list
);
167 FcCacheRead (FcConfig
*config
)
169 FcFontSet
*s
= FcFontSetCreate();
170 FcStrSet
*processed_dirs
;
175 processed_dirs
= FcStrSetCreate();
179 if (FcCacheReadDirs (config
, FcConfigGetConfigDirs (config
), s
, processed_dirs
))
182 FcStrSetDestroy (processed_dirs
);
186 FcStrSetDestroy (processed_dirs
);
188 FcFontSetDestroy (s
);
193 * Look for a cache file for the specified dir. Attempt
194 * to use each one we find, stopping when the callback
198 FcDirCacheProcess (FcConfig
*config
, const FcChar8
*dir
,
199 FcBool (*callback
) (int fd
, off_t size
, void *closure
),
203 FcChar8 cache_base
[CACHEBASE_LEN
];
206 struct stat file_stat
, dir_stat
;
207 FcBool ret
= FcFalse
;
209 if (stat ((char *) dir
, &dir_stat
) < 0)
212 FcDirCacheBasename (dir
, cache_base
);
214 list
= FcStrListCreate (config
->cacheDirs
);
218 while ((cache_dir
= FcStrListNext (list
)))
220 FcChar8
*cache_hashed
= FcStrPlus (cache_dir
, cache_base
);
223 fd
= open((char *) cache_hashed
, O_RDONLY
| O_BINARY
);
224 FcStrFree (cache_hashed
);
226 if (fstat (fd
, &file_stat
) >= 0 &&
227 dir_stat
.st_mtime
<= file_stat
.st_mtime
)
229 ret
= (*callback
) (fd
, file_stat
.st_size
, closure
);
239 FcStrListDone (list
);
245 FcDirCacheLoad (int fd
, off_t size
, void *closure
)
248 FcBool allocated
= FcFalse
;
250 if (size
< sizeof (FcCache
))
252 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
253 cache
= mmap (0, size
, PROT_READ
, MAP_SHARED
, fd
, 0);
254 #elif defined(_WIN32)
259 hFileMap
= CreateFileMapping((HANDLE
) _get_osfhandle(fd
), NULL
,
260 PAGE_READONLY
, 0, 0, NULL
);
261 if (hFileMap
!= NULL
)
263 cache
= MapViewOfFile (hFileMap
, FILE_MAP_READ
, 0, 0, size
);
264 CloseHandle (hFileMap
);
270 cache
= malloc (size
);
274 if (read (fd
, cache
, size
) != size
)
281 if (cache
->magic
!= FC_CACHE_MAGIC
||
288 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
289 munmap (cache
, size
);
290 #elif defined(_WIN32)
291 UnmapViewOfFile (cache
);
297 /* Mark allocated caches so they're freed rather than unmapped */
299 cache
->magic
= FC_CACHE_MAGIC_COPY
;
301 *((FcCache
**) closure
) = cache
;
306 FcDirCacheMap (int fd
, off_t size
)
310 if (FcDirCacheLoad (fd
, size
, &cache
))
316 FcDirCacheRead (FcFontSet
* set
, FcStrSet
* dirs
,
317 const FcChar8
*dir
, FcConfig
*config
)
321 FcFontSet
*cache_set
;
322 intptr_t *cache_dirs
;
323 FcPattern
**cache_fonts
;
325 if (!FcDirCacheProcess (config
, dir
,
330 cache_set
= FcCacheSet (cache
);
331 cache_fonts
= FcFontSetFonts(cache_set
);
332 if (FcDebug() & FC_DBG_CACHE
)
333 printf ("FcDirCacheRead mapped cache for %s (%d fonts %d subdirs)\n",
334 dir
, cache_set
->nfont
, cache
->dirs_count
);
335 for (i
= 0; i
< cache_set
->nfont
; i
++)
337 FcPattern
*font
= FcEncodedOffsetToPtr (cache_set
,
340 if (FcDebug() & FC_DBG_CACHEV
) {
341 printf ("Mapped font %d\n", i
);
342 FcPatternPrint (font
);
344 FcFontSetAdd (set
, font
);
347 cache_dirs
= FcCacheDirs (cache
);
348 for (i
= 0; i
< cache
->dirs_count
; i
++)
349 FcStrSetAdd (dirs
, FcOffsetToPtr (cache_dirs
,
354 FcConfigAddFontDir (config
, (FcChar8
*)dir
);
360 FcDirCacheValidate (int fd
, off_t size
, void *closure
)
364 struct stat file_stat
;
366 if (read (fd
, &c
, sizeof (FcCache
)) != sizeof (FcCache
))
368 else if (fstat (fd
, &file_stat
) < 0)
370 else if (c
.magic
!= FC_CACHE_MAGIC
)
372 else if (file_stat
.st_size
!= c
.size
)
378 FcDirCacheValid (const FcChar8
*dir
, FcConfig
*config
)
380 return FcDirCacheProcess (config
, dir
, FcDirCacheValidate
, NULL
);
384 FcDirCacheUnmap (FcCache
*cache
)
386 if (cache
->magic
== FC_CACHE_MAGIC_COPY
)
391 #if defined(HAVE_MMAP) || defined(__CYGWIN__)
392 munmap (cache
, cache
->size
);
393 #elif defined(_WIN32)
394 UnmapViewOfFile (cache
);
408 FcDirCacheProduce (FcFontSet
*set
, const FcChar8
*dir
, FcStrSet
*dirs
)
410 FcSerialize
*serialize
= FcSerializeCreate ();
413 intptr_t cache_offset
;
414 intptr_t dirs_offset
;
415 FcChar8
*dir_serialize
;
416 intptr_t *dirs_serialize
;
417 FcFontSet
*set_serialize
;
422 * Space for cache structure
424 cache_offset
= FcSerializeReserve (serialize
, sizeof (FcCache
));
428 if (!FcStrSerializeAlloc (serialize
, dir
))
433 dirs_offset
= FcSerializeAlloc (serialize
, dirs
, dirs
->num
* sizeof (FcChar8
*));
434 for (i
= 0; i
< dirs
->num
; i
++)
435 if (!FcStrSerializeAlloc (serialize
, dirs
->strs
[i
]))
441 if (!FcFontSetSerializeAlloc (serialize
, set
))
444 /* Serialize layout complete. Now allocate space and fill it */
445 cache
= malloc (serialize
->size
);
448 /* shut up valgrind */
449 memset (cache
, 0, serialize
->size
);
451 serialize
->linear
= cache
;
453 cache
->magic
= FC_CACHE_MAGIC
;
454 cache
->size
= serialize
->size
;
457 * Serialize directory name
459 dir_serialize
= FcStrSerialize (serialize
, dir
);
462 cache
->dir
= FcPtrToOffset (cache
, dir_serialize
);
467 dirs_serialize
= FcSerializePtr (serialize
, dirs
);
470 cache
->dirs
= FcPtrToOffset (cache
, dirs_serialize
);
471 cache
->dirs_count
= dirs
->num
;
472 for (i
= 0; i
< dirs
->num
; i
++)
474 FcChar8
*d_serialize
= FcStrSerialize (serialize
, dirs
->strs
[i
]);
477 dirs_serialize
[i
] = FcPtrToOffset (dirs_serialize
, d_serialize
);
483 set_serialize
= FcFontSetSerialize (serialize
, set
);
486 cache
->set
= FcPtrToOffset (cache
, set_serialize
);
488 FcSerializeDestroy (serialize
);
495 FcSerializeDestroy (serialize
);
500 FcMakeDirectory (const FcChar8
*dir
)
505 if (strlen ((char *) dir
) == 0)
508 parent
= FcStrDirname (dir
);
511 if (access ((char *) parent
, W_OK
|X_OK
) == 0)
512 ret
= mkdir ((char *) dir
, 0777) == 0;
513 else if (access ((char *) parent
, F_OK
) == -1)
514 ret
= FcMakeDirectory (parent
) && (mkdir ((char *) dir
, 0777) == 0);
521 /* write serialized state to the cache file */
523 FcDirCacheWrite (FcFontSet
*set
, FcStrSet
*dirs
, const FcChar8
*dir
, FcConfig
*config
)
525 FcChar8 cache_base
[CACHEBASE_LEN
];
526 FcChar8
*cache_hashed
;
531 FcChar8
*cache_dir
= NULL
;
535 * Write it to the first directory in the list which is writable
538 list
= FcStrListCreate (config
->cacheDirs
);
541 while ((test_dir
= FcStrListNext (list
))) {
542 if (access ((char *) test_dir
, W_OK
|X_OK
) == 0)
544 cache_dir
= test_dir
;
550 * If the directory doesn't exist, try to create it
552 if (access ((char *) test_dir
, F_OK
) == -1) {
553 if (FcMakeDirectory (test_dir
))
555 cache_dir
= test_dir
;
561 FcStrListDone (list
);
565 FcDirCacheBasename (dir
, cache_base
);
566 cache_hashed
= FcStrPlus (cache_dir
, cache_base
);
570 cache
= FcDirCacheProduce (set
, dir
, dirs
);
575 if (FcDebug () & FC_DBG_CACHE
)
576 printf ("FcDirCacheWriteDir dir \"%s\" file \"%s\"\n",
579 atomic
= FcAtomicCreate ((FcChar8
*)cache_hashed
);
583 if (!FcAtomicLock (atomic
))
586 fd
= open((char *)FcAtomicNewFile (atomic
), O_RDWR
| O_CREAT
| O_BINARY
, 0666);
590 if (write (fd
, cache
, cache
->size
) != cache
->size
)
592 perror ("write cache");
597 if (!FcAtomicReplaceOrig(atomic
))
599 FcStrFree ((FcChar8
*)cache_hashed
);
600 FcAtomicUnlock (atomic
);
601 FcAtomicDestroy (atomic
);
607 FcAtomicUnlock (atomic
);
609 FcAtomicDestroy (atomic
);
613 FcStrFree ((FcChar8
*)cache_hashed
);
618 * This code implements the MD5 message-digest algorithm.
619 * The algorithm is due to Ron Rivest. This code was
620 * written by Colin Plumb in 1993, no copyright is claimed.
621 * This code is in the public domain; do with it what you wish.
623 * Equivalent code is available from RSA Data Security, Inc.
624 * This code has been tested against that, and is equivalent,
625 * except that you don't need to include two pages of legalese
628 * To compute the message digest of a chunk of bytes, declare an
629 * MD5Context structure, pass it to MD5Init, call MD5Update as
630 * needed on buffers full of bytes, and then call MD5Final, which
631 * will fill a supplied 16-byte array with the digest.
635 #define byteReverse(buf, len) /* Nothing */
638 * Note: this code is harmless on little-endian machines.
640 void byteReverse(unsigned char *buf
, unsigned longs
)
644 t
= (FcChar32
) ((unsigned) buf
[3] << 8 | buf
[2]) << 16 |
645 ((unsigned) buf
[1] << 8 | buf
[0]);
646 *(FcChar32
*) buf
= t
;
653 * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
654 * initialization constants.
656 static void MD5Init(struct MD5Context
*ctx
)
658 ctx
->buf
[0] = 0x67452301;
659 ctx
->buf
[1] = 0xefcdab89;
660 ctx
->buf
[2] = 0x98badcfe;
661 ctx
->buf
[3] = 0x10325476;
668 * Update context to reflect the concatenation of another buffer full
671 static void MD5Update(struct MD5Context
*ctx
, unsigned char *buf
, unsigned len
)
675 /* Update bitcount */
678 if ((ctx
->bits
[0] = t
+ ((FcChar32
) len
<< 3)) < t
)
679 ctx
->bits
[1]++; /* Carry from low to high */
680 ctx
->bits
[1] += len
>> 29;
682 t
= (t
>> 3) & 0x3f; /* Bytes already in shsInfo->data */
684 /* Handle any leading odd-sized chunks */
687 unsigned char *p
= (unsigned char *) ctx
->in
+ t
;
695 byteReverse(ctx
->in
, 16);
696 MD5Transform(ctx
->buf
, (FcChar32
*) ctx
->in
);
700 /* Process data in 64-byte chunks */
703 memcpy(ctx
->in
, buf
, 64);
704 byteReverse(ctx
->in
, 16);
705 MD5Transform(ctx
->buf
, (FcChar32
*) ctx
->in
);
710 /* Handle any remaining bytes of data. */
712 memcpy(ctx
->in
, buf
, len
);
716 * Final wrapup - pad to 64-byte boundary with the bit pattern
717 * 1 0* (64-bit count of bits processed, MSB-first)
719 static void MD5Final(unsigned char digest
[16], struct MD5Context
*ctx
)
724 /* Compute number of bytes mod 64 */
725 count
= (ctx
->bits
[0] >> 3) & 0x3F;
727 /* Set the first char of padding to 0x80. This is safe since there is
728 always at least one byte free */
732 /* Bytes of padding needed to make 64 bytes */
733 count
= 64 - 1 - count
;
735 /* Pad out to 56 mod 64 */
737 /* Two lots of padding: Pad the first block to 64 bytes */
739 byteReverse(ctx
->in
, 16);
740 MD5Transform(ctx
->buf
, (FcChar32
*) ctx
->in
);
742 /* Now fill the next block with 56 bytes */
743 memset(ctx
->in
, 0, 56);
745 /* Pad block to 56 bytes */
746 memset(p
, 0, count
- 8);
748 byteReverse(ctx
->in
, 14);
750 /* Append length in bits and transform */
751 ((FcChar32
*) ctx
->in
)[14] = ctx
->bits
[0];
752 ((FcChar32
*) ctx
->in
)[15] = ctx
->bits
[1];
754 MD5Transform(ctx
->buf
, (FcChar32
*) ctx
->in
);
755 byteReverse((unsigned char *) ctx
->buf
, 4);
756 memcpy(digest
, ctx
->buf
, 16);
757 memset(ctx
, 0, sizeof(ctx
)); /* In case it's sensitive */
761 /* The four core functions - F1 is optimized somewhat */
763 /* #define F1(x, y, z) (x & y | ~x & z) */
764 #define F1(x, y, z) (z ^ (x & (y ^ z)))
765 #define F2(x, y, z) F1(z, x, y)
766 #define F3(x, y, z) (x ^ y ^ z)
767 #define F4(x, y, z) (y ^ (x | ~z))
769 /* This is the central step in the MD5 algorithm. */
770 #define MD5STEP(f, w, x, y, z, data, s) \
771 ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
774 * The core of the MD5 algorithm, this alters an existing MD5 hash to
775 * reflect the addition of 16 longwords of new data. MD5Update blocks
776 * the data and converts bytes into longwords for this routine.
778 static void MD5Transform(FcChar32 buf
[4], FcChar32 in
[16])
780 register FcChar32 a
, b
, c
, d
;
787 MD5STEP(F1
, a
, b
, c
, d
, in
[0] + 0xd76aa478, 7);
788 MD5STEP(F1
, d
, a
, b
, c
, in
[1] + 0xe8c7b756, 12);
789 MD5STEP(F1
, c
, d
, a
, b
, in
[2] + 0x242070db, 17);
790 MD5STEP(F1
, b
, c
, d
, a
, in
[3] + 0xc1bdceee, 22);
791 MD5STEP(F1
, a
, b
, c
, d
, in
[4] + 0xf57c0faf, 7);
792 MD5STEP(F1
, d
, a
, b
, c
, in
[5] + 0x4787c62a, 12);
793 MD5STEP(F1
, c
, d
, a
, b
, in
[6] + 0xa8304613, 17);
794 MD5STEP(F1
, b
, c
, d
, a
, in
[7] + 0xfd469501, 22);
795 MD5STEP(F1
, a
, b
, c
, d
, in
[8] + 0x698098d8, 7);
796 MD5STEP(F1
, d
, a
, b
, c
, in
[9] + 0x8b44f7af, 12);
797 MD5STEP(F1
, c
, d
, a
, b
, in
[10] + 0xffff5bb1, 17);
798 MD5STEP(F1
, b
, c
, d
, a
, in
[11] + 0x895cd7be, 22);
799 MD5STEP(F1
, a
, b
, c
, d
, in
[12] + 0x6b901122, 7);
800 MD5STEP(F1
, d
, a
, b
, c
, in
[13] + 0xfd987193, 12);
801 MD5STEP(F1
, c
, d
, a
, b
, in
[14] + 0xa679438e, 17);
802 MD5STEP(F1
, b
, c
, d
, a
, in
[15] + 0x49b40821, 22);
804 MD5STEP(F2
, a
, b
, c
, d
, in
[1] + 0xf61e2562, 5);
805 MD5STEP(F2
, d
, a
, b
, c
, in
[6] + 0xc040b340, 9);
806 MD5STEP(F2
, c
, d
, a
, b
, in
[11] + 0x265e5a51, 14);
807 MD5STEP(F2
, b
, c
, d
, a
, in
[0] + 0xe9b6c7aa, 20);
808 MD5STEP(F2
, a
, b
, c
, d
, in
[5] + 0xd62f105d, 5);
809 MD5STEP(F2
, d
, a
, b
, c
, in
[10] + 0x02441453, 9);
810 MD5STEP(F2
, c
, d
, a
, b
, in
[15] + 0xd8a1e681, 14);
811 MD5STEP(F2
, b
, c
, d
, a
, in
[4] + 0xe7d3fbc8, 20);
812 MD5STEP(F2
, a
, b
, c
, d
, in
[9] + 0x21e1cde6, 5);
813 MD5STEP(F2
, d
, a
, b
, c
, in
[14] + 0xc33707d6, 9);
814 MD5STEP(F2
, c
, d
, a
, b
, in
[3] + 0xf4d50d87, 14);
815 MD5STEP(F2
, b
, c
, d
, a
, in
[8] + 0x455a14ed, 20);
816 MD5STEP(F2
, a
, b
, c
, d
, in
[13] + 0xa9e3e905, 5);
817 MD5STEP(F2
, d
, a
, b
, c
, in
[2] + 0xfcefa3f8, 9);
818 MD5STEP(F2
, c
, d
, a
, b
, in
[7] + 0x676f02d9, 14);
819 MD5STEP(F2
, b
, c
, d
, a
, in
[12] + 0x8d2a4c8a, 20);
821 MD5STEP(F3
, a
, b
, c
, d
, in
[5] + 0xfffa3942, 4);
822 MD5STEP(F3
, d
, a
, b
, c
, in
[8] + 0x8771f681, 11);
823 MD5STEP(F3
, c
, d
, a
, b
, in
[11] + 0x6d9d6122, 16);
824 MD5STEP(F3
, b
, c
, d
, a
, in
[14] + 0xfde5380c, 23);
825 MD5STEP(F3
, a
, b
, c
, d
, in
[1] + 0xa4beea44, 4);
826 MD5STEP(F3
, d
, a
, b
, c
, in
[4] + 0x4bdecfa9, 11);
827 MD5STEP(F3
, c
, d
, a
, b
, in
[7] + 0xf6bb4b60, 16);
828 MD5STEP(F3
, b
, c
, d
, a
, in
[10] + 0xbebfbc70, 23);
829 MD5STEP(F3
, a
, b
, c
, d
, in
[13] + 0x289b7ec6, 4);
830 MD5STEP(F3
, d
, a
, b
, c
, in
[0] + 0xeaa127fa, 11);
831 MD5STEP(F3
, c
, d
, a
, b
, in
[3] + 0xd4ef3085, 16);
832 MD5STEP(F3
, b
, c
, d
, a
, in
[6] + 0x04881d05, 23);
833 MD5STEP(F3
, a
, b
, c
, d
, in
[9] + 0xd9d4d039, 4);
834 MD5STEP(F3
, d
, a
, b
, c
, in
[12] + 0xe6db99e5, 11);
835 MD5STEP(F3
, c
, d
, a
, b
, in
[15] + 0x1fa27cf8, 16);
836 MD5STEP(F3
, b
, c
, d
, a
, in
[2] + 0xc4ac5665, 23);
838 MD5STEP(F4
, a
, b
, c
, d
, in
[0] + 0xf4292244, 6);
839 MD5STEP(F4
, d
, a
, b
, c
, in
[7] + 0x432aff97, 10);
840 MD5STEP(F4
, c
, d
, a
, b
, in
[14] + 0xab9423a7, 15);
841 MD5STEP(F4
, b
, c
, d
, a
, in
[5] + 0xfc93a039, 21);
842 MD5STEP(F4
, a
, b
, c
, d
, in
[12] + 0x655b59c3, 6);
843 MD5STEP(F4
, d
, a
, b
, c
, in
[3] + 0x8f0ccc92, 10);
844 MD5STEP(F4
, c
, d
, a
, b
, in
[10] + 0xffeff47d, 15);
845 MD5STEP(F4
, b
, c
, d
, a
, in
[1] + 0x85845dd1, 21);
846 MD5STEP(F4
, a
, b
, c
, d
, in
[8] + 0x6fa87e4f, 6);
847 MD5STEP(F4
, d
, a
, b
, c
, in
[15] + 0xfe2ce6e0, 10);
848 MD5STEP(F4
, c
, d
, a
, b
, in
[6] + 0xa3014314, 15);
849 MD5STEP(F4
, b
, c
, d
, a
, in
[13] + 0x4e0811a1, 21);
850 MD5STEP(F4
, a
, b
, c
, d
, in
[4] + 0xf7537e82, 6);
851 MD5STEP(F4
, d
, a
, b
, c
, in
[11] + 0xbd3af235, 10);
852 MD5STEP(F4
, c
, d
, a
, b
, in
[2] + 0x2ad7d2bb, 15);
853 MD5STEP(F4
, b
, c
, d
, a
, in
[9] + 0xeb86d391, 21);