comparison src/c/openid.c @ 47:ba203b170476

Use uw_streq(); update to newer Autoconf
author Adam Chlipala <adam@chlipala.net>
date Tue, 19 Jul 2011 09:27:10 -0400
parents 00c8f43be8b7
children
comparison
equal deleted inserted replaced
46:72e942423f26 47:ba203b170476
567 bufO[i] = buf1[i] ^ buf2[i % len2]; 567 bufO[i] = buf1[i] ^ buf2[i % len2];
568 568
569 return base64(ctx, bufO, len1); 569 return base64(ctx, bufO, len1);
570 } 570 }
571 571
572 uw_Basis_bool __attribute__((optimize(0))) uw_OpenidFfi_secCmp(uw_context ctx, uw_Basis_string s1, uw_Basis_string s2) { 572 uw_Basis_bool uw_OpenidFfi_secCmp(uw_context ctx, uw_Basis_string s1, uw_Basis_string s2) {
573 int i, x = 0, len1 = strlen(s1); 573 return uw_streq(s1, s2);
574 if (len1 != strlen(s2)) return 0;
575 for (i = 0; i < len1; ++i)
576 x |= s1[i] ^ s2[i];
577 return x == 0;
578 } 574 }
579 575
580 uw_OpenidFfi_inputs uw_OpenidFfi_remode(uw_context ctx, uw_OpenidFfi_outputs out, uw_Basis_string mode) { 576 uw_OpenidFfi_inputs uw_OpenidFfi_remode(uw_context ctx, uw_OpenidFfi_outputs out, uw_Basis_string mode) {
581 uw_OpenidFfi_inputs in = uw_OpenidFfi_createInputs(ctx); 577 uw_OpenidFfi_inputs in = uw_OpenidFfi_createInputs(ctx);
582 char *s; 578 char *s;