X-Git-Url: https://git.toastfreeware.priv.at/debian/iodine.git/blobdiff_plain/6235fca1d72ece180338b30bb26afa938618cf26..9f5e4e5c1cf6959b8c243fd1f10597786b6bc81e:/src/login.c diff --git a/src/login.c b/src/login.c index 3aee250..a809998 100644 --- a/src/login.c +++ b/src/login.c @@ -1,5 +1,6 @@ /* - * Copyright (c) 2006-2009 Bjorn Andersson , Erik Ekman + * Copyright (c) 2006-2014 Erik Ekman , + * 2006-2009 Bjorn Andersson * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -15,16 +16,22 @@ */ #include -#include #include +#ifdef WINDOWS32 +#include "windows.h" +#else +#include +#include +#endif + #include "md5.h" -/* - * Needs a 16byte array for output, and 32 bytes password +/* + * Needs a 16byte array for output, and 32 bytes password */ -void -login_calculate(char *buf, int buflen, char *pass, int seed) +void +login_calculate(char *buf, int buflen, const char *pass, int seed) { unsigned char temp[32]; md5_state_t ctx; @@ -32,7 +39,7 @@ login_calculate(char *buf, int buflen, char *pass, int seed) int i; int k; - if (buflen < 16) + if (buflen < 16) return; memcpy(temp, pass, 32);