2 Unix SMB/Netbios implementation.
4 SMB parameters and setup
5 Copyright (C) Andrew Tridgell 1992-1997
6 Modified by Jeremy Allison 1995.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #include "smblib-priv.h"
29 typedef unsigned char uchar;
31 void strupper(char *s);
34 This implements the X/Open SMB password encryption
35 It takes a password, a 8 byte "crypt key" and puts 24 bytes of
36 encrypted password into p24 */
37 void SMBencrypt(uchar *passwd, uchar *c8, uchar *p24)
39 uchar p14[15], p21[21];
43 strlcpy((char *) p14, (char *) passwd, sizeof(p14));
45 strupper((char *)p14);
50 void strupper(char *s)
55 if (CTYPE(islower, *s))