mirror of
https://github.com/honojs/hono.git
synced 2024-11-22 11:17:33 +01:00
perf(utils/buffer): use promise all for better performance (#3031)
This commit is contained in:
parent
a9d5313a5a
commit
a9e4176d11
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user