mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
crypto.timingSafeEqual accepts every TypedArray, DataView, Buffer, ArrayBuffer and SharedArrayBuffer and compares their bytes. Values of other types throw Node 24.22's ERR_INVALID_ARG_TYPE for buf1 and then buf2, before the byte lengths are compared. Views of every element kind keep the typed call; other arguments take the checks at run time.