/* This implements the X/Open SMB password encryption It takes a password, a 8 byte "crypt key" and puts 24 bytes of encrypted password into p24  */
void SMBencrypt(unsigned char *passwd, const unsigned char *c8, unsigned char *p24)
/* This implements the X/Open SMB password encryption It takes a password, a 8 byte "crypt key" and puts 24 bytes of encrypted password into p24  */
void SMBencrypt(unsigned char *passwd, const unsigned char *c8, unsigned char *p24)
{
	unsigned char p14[15], p21[21];
	memset(p21, '\0', 21);
	memset(p14, '\0', 14);
	strncpy((char *) p14, (char *) passwd, 14);
	E_P16(p14, p21);
	SMBOWFencrypt(p21, c8, p24);
	memset(p14, 0, 15);
	memset(p21, 0, 21);
}