]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - hostapd/nt_password_hash.c
hostapd: Add airtime policy configuration support
[thirdparty/hostap.git] / hostapd / nt_password_hash.c
index 9df307d54a84f438484b43cca84d245ed9b215eb..7064b9cb6b6af2907239755a72ba6a8d4f8332f3 100644 (file)
@@ -2,20 +2,14 @@
  * hostapd - Plaintext password to NtPasswordHash
  * Copyright (c) 2005, Jouni Malinen <j@w1.fi>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "includes.h"
 
 #include "common.h"
-#include "ms_funcs.h"
+#include "crypto/ms_funcs.h"
 
 
 int main(int argc, char *argv[])
@@ -43,7 +37,8 @@ int main(int argc, char *argv[])
                password = buf;
        }
 
-       nt_password_hash((u8 *) password, strlen(password), password_hash);
+       if (nt_password_hash((u8 *) password, strlen(password), password_hash))
+               return -1;
        for (i = 0; i < sizeof(password_hash); i++)
                printf("%02x", password_hash[i]);
        printf("\n");