#include <freeradius-devel/ident.h>
RCSID("$Id$")
-#include <string.h>
+#include <freeradius-devel/libradius.h>
#include <ctype.h>
+#include "smbdes.h"
#define uchar unsigned char
* Converts the password to uppercase, and creates the LM
* password hash.
*/
-void smbdes_lmpwdhash(const unsigned char *password,unsigned char *lmhash)
+void smbdes_lmpwdhash(const char *password, uint8_t *lmhash)
{
int i;
- unsigned char p14[14];
- static unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
+ uint8_t p14[14];
+ static uint8_t sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
memset(p14, 0, sizeof(p14));
for (i = 0; i < 14 && password[i]; i++) {
*
* The win_password MUST be exactly 16 bytes long.
*/
-void smbdes_mschap(const unsigned char *win_password,
- const unsigned char *challenge, unsigned char *response)
+void smbdes_mschap(const uint8_t win_password[16],
+ const uint8_t *challenge, uint8_t *response)
{
- unsigned char p21[21];
+ uint8_t p21[21];
memset(p21, 0, sizeof(p21));
memcpy(p21, win_password, 16);