diff --git a/src/utils/buffer.ts b/src/utils/buffer.ts index cde4c789..b8ead4ee 100644 --- a/src/utils/buffer.ts +++ b/src/utils/buffer.ts @@ -35,8 +35,7 @@ export const timingSafeEqual = async ( hashFunction = sha256 } - const sa = await hashFunction(a) - const sb = await hashFunction(b) + const [sa, sb] = await Promise.all([hashFunction(a), hashFunction(b)]) if (!sa || !sb) { return false