summaryrefslogtreecommitdiff
path: root/jni/iodine/src/login.c
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-08-11 23:26:36 +0200
committerYves Fischer <yvesf-git@xapek.org>2014-08-11 23:26:36 +0200
commit5d8801d4687035ae45143f0f3bc3eeaf75dc17ec (patch)
treebf4395fd5938eb1865ba90b6e52e169d727d9404 /jni/iodine/src/login.c
parent1251ce0d7cf2619f9b41637dcb88bebb66e54fb3 (diff)
downloadandiodine-5d8801d4687035ae45143f0f3bc3eeaf75dc17ec.tar.gz
andiodine-5d8801d4687035ae45143f0f3bc3eeaf75dc17ec.zip
Upgrade code to iodine 0.7.0 and improve logging
Diffstat (limited to 'jni/iodine/src/login.c')
-rw-r--r--jni/iodine/src/login.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/jni/iodine/src/login.c b/jni/iodine/src/login.c
index c8827c3..a809998 100644
--- a/jni/iodine/src/login.c
+++ b/jni/iodine/src/login.c
@@ -1,5 +1,6 @@
/*
- * Copyright (c) 2006-2009 Bjorn Andersson <flex@kryo.se>, Erik Ekman <yarrick@kryo.se>
+ * Copyright (c) 2006-2014 Erik Ekman <yarrick@kryo.se>,
+ * 2006-2009 Bjorn Andersson <flex@kryo.se>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -20,16 +21,17 @@
#ifdef WINDOWS32
#include "windows.h"
#else
+#include <netinet/in.h>
#include <arpa/inet.h>
#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, const char *pass, int seed)
+void
+login_calculate(char *buf, int buflen, const char *pass, int seed)
{
unsigned char temp[32];
md5_state_t ctx;
@@ -37,7 +39,7 @@ login_calculate(char *buf, int buflen, const char *pass, int seed)
int i;
int k;
- if (buflen < 16)
+ if (buflen < 16)
return;
memcpy(temp, pass, 32);