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

Side by Side Diff: fusl/src/crypt/crypt_blowfish.c

Issue 1706293003: [fusl] Remove some more tabs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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 /* Modified by Rich Felker in for inclusion in musl libc, based on 1 /* Modified by Rich Felker in for inclusion in musl libc, based on
2 * Solar Designer's second size-optimized version sent to the musl 2 * Solar Designer's second size-optimized version sent to the musl
3 * mailing list. */ 3 * mailing list. */
4 4
5 /* 5 /*
6 * The crypt_blowfish homepage is: 6 * The crypt_blowfish homepage is:
7 * 7 *
8 * http://www.openwall.com/crypt/ 8 * http://www.openwall.com/crypt/
9 * 9 *
10 * This code comes from John the Ripper password cracker, with reentrant 10 * This code comes from John the Ripper password cracker, with reentrant
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 BF_word L, 364 BF_word L,
365 BF_word R, 365 BF_word R,
366 BF_word* start, 366 BF_word* start,
367 BF_word* end) { 367 BF_word* end) {
368 BF_word tmp1, tmp2, tmp3, tmp4; 368 BF_word tmp1, tmp2, tmp3, tmp4;
369 BF_word* ptr = start; 369 BF_word* ptr = start;
370 370
371 do { 371 do {
372 L ^= ctx->s.P[0]; 372 L ^= ctx->s.P[0];
373 #if 0 373 #if 0
374 » » BF_ROUND(L, R, 0); 374 BF_ROUND(L, R, 0);
375 » » BF_ROUND(R, L, 1); 375 BF_ROUND(R, L, 1);
376 » » BF_ROUND(L, R, 2); 376 BF_ROUND(L, R, 2);
377 » » BF_ROUND(R, L, 3); 377 BF_ROUND(R, L, 3);
378 » » BF_ROUND(L, R, 4); 378 BF_ROUND(L, R, 4);
379 » » BF_ROUND(R, L, 5); 379 BF_ROUND(R, L, 5);
380 » » BF_ROUND(L, R, 6); 380 BF_ROUND(L, R, 6);
381 » » BF_ROUND(R, L, 7); 381 BF_ROUND(R, L, 7);
382 » » BF_ROUND(L, R, 8); 382 BF_ROUND(L, R, 8);
383 » » BF_ROUND(R, L, 9); 383 BF_ROUND(R, L, 9);
384 » » BF_ROUND(L, R, 10); 384 BF_ROUND(L, R, 10);
385 » » BF_ROUND(R, L, 11); 385 BF_ROUND(R, L, 11);
386 » » BF_ROUND(L, R, 12); 386 BF_ROUND(L, R, 12);
387 » » BF_ROUND(R, L, 13); 387 BF_ROUND(R, L, 13);
388 » » BF_ROUND(L, R, 14); 388 BF_ROUND(L, R, 14);
389 » » BF_ROUND(R, L, 15); 389 BF_ROUND(R, L, 15);
390 #else 390 #else
391 for (int i = 0; i < 16; i += 2) { 391 for (int i = 0; i < 16; i += 2) {
392 BF_ROUND(L, R, i); 392 BF_ROUND(L, R, i);
393 BF_ROUND(R, L, i + 1); 393 BF_ROUND(R, L, i + 1);
394 } 394 }
395 #endif 395 #endif
396 tmp4 = R; 396 tmp4 = R;
397 R = L; 397 R = L;
398 L = tmp4 ^ ctx->s.P[BF_N + 1]; 398 L = tmp4 ^ ctx->s.P[BF_N + 1];
399 *ptr++ = L; 399 *ptr++ = L;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 ai[0] ^= 0x10000; /* undo the safety (for comparison) */ 696 ai[0] ^= 0x10000; /* undo the safety (for comparison) */
697 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 && 697 ok = ok && ai[0] == 0xdb9c59bc && ye[17] == 0x33343500 &&
698 !memcmp(ae, ye, sizeof(ae)) && !memcmp(ai, yi, sizeof(ai)); 698 !memcmp(ae, ye, sizeof(ae)) && !memcmp(ai, yi, sizeof(ai));
699 } 699 }
700 700
701 if (ok && retval) 701 if (ok && retval)
702 return retval; 702 return retval;
703 703
704 return "*"; 704 return "*";
705 } 705 }
OLDNEW
« no previous file with comments | « fusl/arch/mips/atomic_arch.h ('k') | fusl/src/malloc/malloc.c » ('j') | fusl/src/regex/regcomp.c » ('J')

Powered by Google App Engine
This is Rietveld 408576698