You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Evaluate const fn encoding/decoding and stack buffer helpers #14
Concrete profile constructors and sizing methods (encoded_len, max_decoded_len) are already const fn, but encoding and decoding themselves cannot yet be evaluated at compile time (for example const KEY: [u8; 32] = ...; in protocol constants and test vectors, where crates otherwise pull in hex-literal or const-hex). Formatting short digests onto the stack also currently takes two statements (let mut buf = [0_u8; N]; let s = Base16Lower::encode_into(bytes, &mut buf)?;).
Considerations
Because stable const fn cannot accept impl AsRef<[u8]> bounds, evaluate whether dedicated const fn slice/array helpers (such as decode_array_const::<N>(&[u8])) justify the extra method surface.
Evaluate whether an itoa-style stack formatting buffer or fixed-array encode helper adds enough convenience over encode_into + const { Profile::encoded_len(N) } and EncodedDisplay.
Activity