summaryrefslogtreecommitdiff
path: root/source4/libcli/auth/ntlmssp_sign.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/auth/ntlmssp_sign.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/auth/ntlmssp_sign.c')
-rw-r--r--source4/libcli/auth/ntlmssp_sign.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/libcli/auth/ntlmssp_sign.c b/source4/libcli/auth/ntlmssp_sign.c
index df7bddcd38..22aa877b63 100644
--- a/source4/libcli/auth/ntlmssp_sign.c
+++ b/source4/libcli/auth/ntlmssp_sign.c
@@ -27,16 +27,16 @@
#define SRV_SIGN "session key to server-to-client signing key magic constant"
#define SRV_SEAL "session key to server-to-client sealing key magic constant"
-static void NTLMSSPcalc_ap( unsigned char *hash, unsigned char *data, int len)
+static void NTLMSSPcalc_ap( uint8_t *hash, uint8_t *data, int len)
{
- unsigned char index_i = hash[256];
- unsigned char index_j = hash[257];
+ uint8_t index_i = hash[256];
+ uint8_t index_j = hash[257];
int ind;
for (ind = 0; ind < len; ind++)
{
- unsigned char tc;
- unsigned char t;
+ uint8_t tc;
+ uint8_t t;
index_i++;
index_j += hash[index_i];
@@ -53,19 +53,19 @@ static void NTLMSSPcalc_ap( unsigned char *hash, unsigned char *data, int len)
hash[257] = index_j;
}
-static void calc_hash(unsigned char hash[258], const char *key, size_t key_len)
+static void calc_hash(uint8_t hash[258], const char *key, size_t key_len)
{
- unsigned char j = 0;
+ uint8_t j = 0;
int ind;
for (ind = 0; ind < 256; ind++)
{
- hash[ind] = (unsigned char)ind;
+ hash[ind] = (uint8_t)ind;
}
for (ind = 0; ind < 256; ind++)
{
- unsigned char tc;
+ uint8_t tc;
j += (hash[ind] + key[ind%key_len]);
@@ -97,7 +97,7 @@ static void calc_hash(unsigned char hash[258], const char *key, size_t key_len)
-static void calc_ntlmv2_hash(unsigned char hash[258], unsigned char subkey[16],
+static void calc_ntlmv2_hash(uint8_t hash[258], uint8_t subkey[16],
DATA_BLOB session_key,
const char *constant)
{
@@ -365,7 +365,7 @@ NTSTATUS ntlmssp_unseal_packet(NTLMSSP_STATE *ntlmssp_state,
*/
NTSTATUS ntlmssp_sign_init(NTLMSSP_STATE *ntlmssp_state)
{
- unsigned char p24[24];
+ uint8_t p24[24];
ZERO_STRUCT(p24);
DEBUG(3, ("NTLMSSP Sign/Seal - Initialising with flags:\n"));