From e132cb9d0bc2c4d56295df65a2e08bfc65af4f10 Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Mon, 27 Jul 2020 13:18:24 -0700 Subject: [PATCH] Fixed hash buffer size --- meshcore/wincrypto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshcore/wincrypto.cpp b/meshcore/wincrypto.cpp index d2dfc88..2815281 100644 --- a/meshcore/wincrypto.cpp +++ b/meshcore/wincrypto.cpp @@ -340,7 +340,7 @@ Cleanup: int __fastcall wincrypto_md5(char* data, int datalen, char* result) { return wincrypto_hash(BCRYPT_MD5_ALGORITHM, data, datalen, result, 16); } int __fastcall wincrypto_sha256(char* data, int datalen, char* result) { return wincrypto_hash(BCRYPT_SHA256_ALGORITHM, data, datalen, result, 32); } -int __fastcall wincrypto_sha384(char* data, int datalen, char* result) { return wincrypto_hash(BCRYPT_SHA384_ALGORITHM, data, datalen, result, 32); } +int __fastcall wincrypto_sha384(char* data, int datalen, char* result) { return wincrypto_hash(BCRYPT_SHA384_ALGORITHM, data, datalen, result, 48); } // Sign the data with the Mesh Agent certificate and return a PKCS7 result. int __fastcall wincrypto_sign(wincrypto_object j, char* data, int len, char** signature)