Skip to main content

left_encode

Function left_encode 

Source
fn left_encode(value: u32, buffer: &mut [u8; 5]) -> &[u8] 
Expand description

The left_encode function defined in Section 2.3.1 of [NIST-SP800-185], using value as the x input parameter. https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf

Callers need to provide buffer for internal operations. The buffer can be reused afterwards in separate calls of right_encode and left_encode.