diff --git a/windows/utils/cryptoapi.c b/windows/utils/cryptoapi.c index 1c017903..c3752c59 100644 --- a/windows/utils/cryptoapi.c +++ b/windows/utils/cryptoapi.c @@ -69,7 +69,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);