Fix FingerprintKey

pull/932/head
Yosuke Shimizu 2026-04-17 17:37:18 +09:00
parent 91cbb647d1
commit 2608f90fa1
1 changed files with 5 additions and 3 deletions

View File

@ -214,10 +214,12 @@ static int FingerprintKey(const byte* pubKey, word32 pubKeySz, char* out)
int ret;
ret = wc_InitSha256(&sha);
if (ret == 0)
if (ret == 0) {
ret = wc_Sha256Update(&sha, pubKey, pubKeySz);
if (ret == 0)
ret = wc_Sha256Final(&sha, digest);
if (ret == 0)
ret = wc_Sha256Final(&sha, digest);
wc_Sha256Free(&sha);
}
if (ret == 0)
ret = Base64_Encode_NoNl(digest, sizeof(digest), (byte*)fp, &fpSz);