⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

encode_length

Function encode_length 

Source
pub fn encode_length(length: usize, out: &mut Vec<u8>)
Expand description

Encode a BER definite-length value.

Short form: lengths 0..=127 use a single byte. Long form: lengths >= 128 use one byte for the count of length bytes, followed by that many bytes encoding the length in big-endian.