OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 /* | 5 /* |
6 * secport.c - portability interfaces for security libraries | 6 * secport.c - portability interfaces for security libraries |
7 * | 7 * |
8 * This file abstracts out libc functionality that libsec depends on | 8 * This file abstracts out libc functionality that libsec depends on |
9 * | 9 * |
10 * NOTE - These are not public interfaces | 10 * NOTE - These are not public interfaces |
11 * | |
12 * $Id$ | |
13 */ | 11 */ |
14 | 12 |
15 #include "seccomon.h" | 13 #include "seccomon.h" |
16 #include "prmem.h" | 14 #include "prmem.h" |
17 #include "prerror.h" | 15 #include "prerror.h" |
18 #include "plarena.h" | 16 #include "plarena.h" |
19 #include "secerr.h" | 17 #include "secerr.h" |
20 #include "prmon.h" | 18 #include "prmon.h" |
21 #include "nssilock.h" | 19 #include "nssilock.h" |
22 #include "secport.h" | 20 #include "secport.h" |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
671 const unsigned char *b = (const unsigned char*) ib; | 669 const unsigned char *b = (const unsigned char*) ib; |
672 size_t i; | 670 size_t i; |
673 unsigned char r = 0; | 671 unsigned char r = 0; |
674 | 672 |
675 for (i = 0; i < n; ++i) { | 673 for (i = 0; i < n; ++i) { |
676 r |= *a++ ^ *b++; | 674 r |= *a++ ^ *b++; |
677 } | 675 } |
678 | 676 |
679 return r; | 677 return r; |
680 } | 678 } |
OLD | NEW |