Skip to main content

ct_hex_encode

Function ct_hex_encode 

Source
pub fn ct_hex_encode(data: &[u8]) -> String
Expand description

Constant-time hex encoding for secret material.

Uses branchless arithmetic to convert nibbles to hex characters, avoiding both data-dependent branches and index-based table lookups (which can leak via cache timing).