Skip to main content

Crate orderable_bytes

Crate orderable_bytes 

Source
Expand description

Canonical, order-preserving fixed-length byte encodings for plaintext types.

Each supported type implements ToOrderableBytes, which maps a value to a fixed-length byte array whose byte-wise lexicographic order agrees with the type’s natural total order, and whose byte equality agrees with the type’s value equality. The resulting bytes are scheme-agnostic — they’re intended for any comparison-as-bytes scheme that wants to preserve plaintext order on ciphertexts (e.g. ore-rs BlockORE, an OPE construction, an ordered hash).

Encoders are gated behind per-type feature flags so callers only pay for the dependencies they actually use.

Modules§

primitive
Canonical, order-preserving fixed-length byte encodings for the primitives bool, char, u8, i8, i16, i32, i64, u128, i128, and the IEEE 754 floats f32 and f64.

Traits§

ToOrderableBytes
Maps a value to its canonical, order-preserving fixed-length byte encoding.