Skip to content

otplib API Documentation / @otplib/core / validateByteLengthEqual

Function: validateByteLengthEqual()

validateByteLengthEqual(a, b): boolean

Defined in: packages/core/src/utils.ts:493

Validate that two byte arrays have equal length

Useful as a preliminary check before performing byte-by-byte comparisons.

Parameters

a

Uint8Array

First byte array

b

Uint8Array

Second byte array

Returns

boolean

true if arrays have equal length, false otherwise

Released under the MIT License.