mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
libcli:auth: Remove unused E_md5hash()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14195 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
4199d1040f
commit
e19b115dd2
@ -105,14 +105,6 @@ bool SMBencrypt(const char *passwd, const uint8_t *c8, uint8_t p24[24]);
|
||||
*/
|
||||
bool E_md4hash(const char *passwd, uint8_t p16[16]);
|
||||
|
||||
/**
|
||||
* Creates the MD5 Hash of a combination of 16 byte salt and 16 byte NT hash.
|
||||
* @param 16 byte salt.
|
||||
* @param 16 byte NT hash.
|
||||
* @param 16 byte return hashed with md5, caller allocated 16 byte buffer
|
||||
*/
|
||||
void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16]);
|
||||
|
||||
/**
|
||||
* Creates the DES forward-only Hash of the users password in DOS ASCII charset
|
||||
* @param passwd password in 'unix' charset.
|
||||
|
@ -94,39 +94,6 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the MD5 Hash of a combination of 16 byte salt and 16 byte NT hash.
|
||||
* @param 16 byte salt.
|
||||
* @param 16 byte NT hash.
|
||||
* @param 16 byte return hashed with md5, caller allocated 16 byte buffer
|
||||
*/
|
||||
|
||||
void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
|
||||
{
|
||||
gnutls_hash_hd_t hash_hnd = NULL;
|
||||
int rc;
|
||||
|
||||
rc = gnutls_hash_init(&hash_hnd, GNUTLS_DIG_MD5);
|
||||
if (rc < 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = gnutls_hash(hash_hnd, salt, 16);
|
||||
if (rc < 0) {
|
||||
gnutls_hash_deinit(hash_hnd, NULL);
|
||||
goto out;
|
||||
}
|
||||
rc = gnutls_hash(hash_hnd, nthash, 16);
|
||||
if (rc < 0) {
|
||||
gnutls_hash_deinit(hash_hnd, NULL);
|
||||
goto out;
|
||||
}
|
||||
gnutls_hash_deinit(hash_hnd, hash_out);
|
||||
|
||||
out:
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the DES forward-only Hash of the users password in DOS ASCII charset
|
||||
* @param passwd password in 'unix' charset.
|
||||
|
Loading…
Reference in New Issue
Block a user