aboutsummaryrefslogtreecommitdiff
path: root/lib/libcrypt/crypt-nthash.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypt/crypt-nthash.c')
-rw-r--r--lib/libcrypt/crypt-nthash.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/libcrypt/crypt-nthash.c b/lib/libcrypt/crypt-nthash.c
index bb2d60b27846..774fe3437c25 100644
--- a/lib/libcrypt/crypt-nthash.c
+++ b/lib/libcrypt/crypt-nthash.c
@@ -1,5 +1,5 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2003 Michael Bretterklieber
* All rights reserved.
@@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
#include <sys/types.h>
#include <netinet/in.h>
@@ -59,17 +56,17 @@ crypt_nthash(const char *pw, const char *salt __unused, char *buffer)
u_char hash[MD4_SIZE];
const char *s;
MD4_CTX ctx;
-
- bzero(unipw, sizeof(unipw));
+
+ bzero(unipw, sizeof(unipw));
/* convert to unicode (thanx Archie) */
unipwLen = 0;
for (s = pw; unipwLen < sizeof(unipw) / 2 && *s; s++)
unipw[unipwLen++] = htons(*s << 8);
-
+
/* Compute MD4 of Unicode password */
- MD4Init(&ctx);
+ MD4Init(&ctx);
MD4Update(&ctx, (u_char *)unipw, unipwLen*sizeof(u_int16_t));
- MD4Final(hash, &ctx);
+ MD4Final(hash, &ctx);
buffer = stpcpy(buffer, magic);
*buffer++ = '$';