print_usage: merge printf calls and realign.
[skeinsum.git] / skein_port.h
1 #ifndef _SKEIN_PORT_H_\r
2 #define _SKEIN_PORT_H_\r
3 /*******************************************************************\r
4 **\r
5 ** Platform-specific definitions for Skein hash function.\r
6 **\r
7 ** Source code author: Doug Whiting, 2008.\r
8 **\r
9 ** This algorithm and source code is released to the public domain.\r
10 **\r
11 ** Many thanks to Brian Gladman for his portable header files, which\r
12 ** have been modified slightly here, to handle a few more platforms.\r
13 **\r
14 ** To port Skein to an "unsupported" platform, change the definitions\r
15 ** in this file appropriately.\r
16 ** \r
17 ********************************************************************/\r
18 \r
19 #include "brg_types.h"                      /* get integer type definitions */\r
20 \r
21 typedef unsigned int    uint_t;             /* native unsigned integer */\r
22 typedef uint_8t         u08b_t;             /*  8-bit unsigned integer */\r
23 typedef uint_64t        u64b_t;             /* 64-bit unsigned integer */\r
24 \r
25 /*\r
26  * Skein is "natively" little-endian (unlike SHA-xxx), for optimal\r
27  * performance on x86 CPUs.  The Skein code requires the following\r
28  * definitions for dealing with endianness:\r
29  *\r
30  *    Skein_Put64_LSB_First\r
31  *    Skein_Get64_LSB_First\r
32  *    Skein_Swap64\r
33  *\r
34  * In the reference code, these functions are implemented in a\r
35  * very portable (and thus slow) fashion, for clarity. See the file\r
36  * "skein_port.h" in the Optimized_Code directory for ways to make\r
37  * these functions fast(er) on x86 platforms.\r
38  */\r
39 \r
40 u64b_t Skein_Swap64(u64b_t w64);\r
41 void   Skein_Put64_LSB_First(u08b_t *dst,const u64b_t *src,size_t bCnt);\r
42 void   Skein_Get64_LSB_First(u64b_t *dst,const u08b_t *src,size_t wCnt);\r
43 \r
44 #endif   /* ifndef _SKEIN_PORT_H_ */\r