fix: ensure bodyRemaining is a Uint8Array after padding in generatePartialSHA

This commit is contained in:
zkfriendly
2025-08-22 12:16:17 +02:00
parent 80e6d39c9f
commit e11b7801ec

View File

@@ -65,7 +65,7 @@ export function generatePartialSHA({
throw new Error('Remaining body was not padded correctly with int64s');
}
bodyRemaining = padUint8ArrayWithZeros(bodyRemaining, maxRemainingBodyLength);
bodyRemaining = new Uint8Array(padUint8ArrayWithZeros(bodyRemaining, maxRemainingBodyLength));
const precomputedSha = partialSha(precomputeText, shaCutoffIndex);
return {