Skip to main content

Crate base64_ng_subtle

Crate base64_ng_subtle 

Source
Expand description

Optional subtle::ConstantTimeEq integration for base64-ng.

The core base64-ng package stays zero-runtime-dependency. This companion crate exists for applications that already admit subtle and want a reviewed comparison primitive at the protocol boundary.

Length is treated as public. Mismatched lengths return [subtle::Choice::from(0)] immediately. Use fixed-size protocol tokens when length must not vary. When the length itself is secret, compare fixed-size arrays or fixed-width protocol buffers directly with subtle::ConstantTimeEq instead of this public-length helper.

Traits§

SubtleEqExt
Extension trait for comparing base64-ng buffers with subtle.

Functions§

subtle_ct_eq_public_len
Compares two byte slices with public length.