MAC.verify

bool verify(const(ubyte)[] expectedTag)

Finalizes the computation and verifies the tag against expectedTag.

Tag comparison MUST be constant-time: this default implementation uses common.safeEqual, and implementations overriding it must preserve that property. Never compare tags with `==`, which leaks the position of the first mismatching byte and enables forgery via timing.

Parameters

expectedTagThe tag to verify against; a length differing from size fails the comparison.

Returns

true when the computed tag matches expectedTag.