diff --git a/windows/wincapi.c b/windows/wincapi.c index 8059f753..de78988b 100644 --- a/windows/wincapi.c +++ b/windows/wincapi.c @@ -71,7 +71,11 @@ char *capi_obfuscate_string(const char *realname) * We don't want to give away the length of the hostname either, * so having got it back out of CryptProtectMemory we now hash it. */ - hash_simple(&ssh_sha256, make_ptrlen(cryptdata, cryptlen), digest); + { + ssh_hash *h = ssh_hash_new(&ssh_sha256); + put_string(h, cryptdata, cryptlen); + ssh_hash_final(h, digest); + } sfree(cryptdata);