Import with #import "std/constant_time".

ConstantTimeEqual :: (left: []u8, right: []u8) -> bool
ConstantTimeTextEqual :: (left: string, right: string) -> bool

Text carries arbitrary bytes without a mutable borrowed view. Compare every byte of equal-length tags just as for caller-owned byte spans.

Source ↗ · All modules