Node.js crypto.timingSafeEqual() Function
The crypto.timingSafeEqual() function is used to determine whether two variables are equal without exposing timing information that may allow an attacker to guess one of the values. A constant-time algorithm underpins it.
- a: It is a variable that must be Buffer, TypedArray, or DataView.
- b: It is a variable that must be Buffer, TypedArray, or DataView and must be of the same length as a.
Return Value: true if a is equal to b, else false.