summaryrefslogtreecommitdiff
path: root/source4/libcli/util/smbencrypt.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-29 08:11:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:21 -0500
commit45e93c19ef95978f908f5b14962770510634cd3b (patch)
tree79e3dd4cb4154b6a90ceaa5fe8d56413a02ebf0e /source4/libcli/util/smbencrypt.c
parentd9538e7412c593a9dc10a600676939d2cf0205ea (diff)
downloadsamba-45e93c19ef95978f908f5b14962770510634cd3b.tar.gz
samba-45e93c19ef95978f908f5b14962770510634cd3b.tar.bz2
samba-45e93c19ef95978f908f5b14962770510634cd3b.zip
r943: change samba4 to use 'uint8_t' instead of 'unsigned char'
metze (This used to be commit b5378803fdcb3b3afe7c2932a38828e83470f61a)
Diffstat (limited to 'source4/libcli/util/smbencrypt.c')
-rw-r--r--source4/libcli/util/smbencrypt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/libcli/util/smbencrypt.c b/source4/libcli/util/smbencrypt.c
index 5b210394c1..d52d24e1e1 100644
--- a/source4/libcli/util/smbencrypt.c
+++ b/source4/libcli/util/smbencrypt.c
@@ -68,7 +68,7 @@ void E_md4hash(const char *passwd, uchar p16[16])
/* Calculate length in bytes */
len = strlen_w(wpwd) * sizeof(int16_t);
- mdfour(p16, (unsigned char *)wpwd, len);
+ mdfour(p16, (uint8_t *)wpwd, len);
ZERO_STRUCT(wpwd);
}
@@ -90,7 +90,7 @@ BOOL E_deshash(const char *passwd, uchar p16[16])
push_ascii(dospwd, passwd, sizeof(dospwd), STR_UPPER|STR_TERMINATE);
/* Only the fisrt 14 chars are considered, password need not be null terminated. */
- E_P16((const unsigned char *)dospwd, p16);
+ E_P16((const uint8_t *)dospwd, p16);
if (strlen(dospwd) > 14) {
ret = False;
@@ -170,8 +170,8 @@ BOOL ntv2_owf_gen(const uchar owf[16],
domain_byte_len = domain_byte_len - 2;
hmac_md5_init_limK_to_64(owf, 16, &ctx);
- hmac_md5_update((const unsigned char *)user, user_byte_len, &ctx);
- hmac_md5_update((const unsigned char *)domain, domain_byte_len, &ctx);
+ hmac_md5_update((const uint8_t *)user, user_byte_len, &ctx);
+ hmac_md5_update((const uint8_t *)domain, domain_byte_len, &ctx);
hmac_md5_final(kr_buf, &ctx);
#ifdef DEBUG_PASSWORD
@@ -247,7 +247,7 @@ void SMBsesskeygen_ntv2(const uchar kr[16],
hmac_md5_init_limK_to_64(kr, 16, &ctx);
hmac_md5_update(nt_resp, 16, &ctx);
- hmac_md5_final((unsigned char *)sess_key, &ctx);
+ hmac_md5_final((uint8_t *)sess_key, &ctx);
#ifdef DEBUG_PASSWORD
DEBUG(100, ("SMBsesskeygen_ntv2:\n"));
@@ -260,7 +260,7 @@ void SMBsesskeygen_ntv1(const uchar kr[16], uint8_t sess_key[16])
/* yes, this session key does not change - yes, this
is a problem - but it is 128 bits */
- mdfour((unsigned char *)sess_key, kr, 16);
+ mdfour((uint8_t *)sess_key, kr, 16);
#ifdef DEBUG_PASSWORD
DEBUG(100, ("SMBsesskeygen_ntv1:\n"));
@@ -443,7 +443,7 @@ BOOL encode_pw_buffer(char buffer[516], const char *password, int string_flags)
memcpy(&buffer[512 - new_pw_len], new_pw, new_pw_len);
- generate_random_buffer((unsigned char *)buffer, 512 - new_pw_len, False);
+ generate_random_buffer((uint8_t *)buffer, 512 - new_pw_len, False);
/*
* The length of the new password is in the last 4 bytes of