| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| must have the same byte length. | ||
|
|
||
| If at least one of `a` and `b` is a `TypedArray`, the result may depend on | ||
| the platform byte order. |
There was a problem hiding this comment.
may depend sounds like this isn’t deterministic, but I assume it is? It’s always going to depend on the platform byte order, right?
Sorry, something went wrong.
There was a problem hiding this comment.
Good point! My thinking was that the result of some inputs (e.g., timingSafeEqual(new Uint8Array([1, 1]), new Uint16Array([0x0101]))) does not depend on the platform byte order, but that's probably not what others would take away from the way I worded it.
Sorry, something went wrong.
There was a problem hiding this comment.
Yeah, I see … maybe I would say something like If at least one of `a` and `b` is a `TypedArray` with more than one byte per entry, like `Uint16Array`, the result will be computed using platform byte order?
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry about the delay, fixed!
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with the elimination of may from the text.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: #36323 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
|
Landed in 6255973, thank you for reviewing! |
Sorry, something went wrong.
PR-URL: #36323 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: #36323 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
| Back | FazBrowse Home | New Git URL |
Since #29657, timingSafeEqual uses byteLength instead of length. When comparing different types (e.g., Uint8Array and Uint16Array), the result can depend on the byte order of the system architecture.
Checklist