Key.opEquals

bool opEquals(const Key other) const;

Equality comparison based on key material.

Two keys are considered equal if they have the same algorithm and the same encoded bytes (compared in constant time).

Note

as with toHash, the built-in `==` operator only dispatches here

when the implementation also overrides bool opEquals(Object) and forwards to this method (see toHash). Implementations must keep toHash and opEquals consistent, and should use constant-time comparison (e.g., safeEqual) for the encoded bytes to prevent timing attacks; comparison time then varies with key length.

Parameters

otherThe key to compare against.

Returns

true if the keys are equal, false otherwise.