comparison xrogue/xcrypt.c @ 207:3def5e487faa

XRogue: fix md_htonl() and md_ntohl(). xcrypt requires them. The implementations in state.c used htonl() and ntohl(), which aren't available on Windows. So the Advanced Rogue 7 versions were copied over. This implementation could be problematic on other systems where sizeof(long) == 8. Maybe someday I can convert everything to C99 and use stdint.h.
author John "Elwin" Edwards
date Thu, 13 Aug 2015 17:17:40 -0400
parents e6179860cb76
children e52a8a7ad4c5
comparison
equal deleted inserted replaced
206:a3d90e31a001 207:3def5e487faa
51 51
52 #include <sys/types.h> 52 #include <sys/types.h>
53 #include <string.h> 53 #include <string.h>
54 54
55 #define _PASSWORD_EFMT1 '_' 55 #define _PASSWORD_EFMT1 '_'
56
57 unsigned long int md_htonl(unsigned long int x);
58 unsigned long int md_ntohl(unsigned long int x);
56 59
57 static unsigned char IP[64] = { 60 static unsigned char IP[64] = {
58 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4, 61 58, 50, 42, 34, 26, 18, 10, 2, 60, 52, 44, 36, 28, 20, 12, 4,
59 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8, 62 62, 54, 46, 38, 30, 22, 14, 6, 64, 56, 48, 40, 32, 24, 16, 8,
60 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3, 63 57, 49, 41, 33, 25, 17, 9, 1, 59, 51, 43, 35, 27, 19, 11, 3,