Skip to main content

read_bit_string

Function read_bit_string 

Source
pub fn read_bit_string(input: &[u8]) -> Option<(u8, &[u8], &[u8])>
Expand description

Read a DER BIT STRING.

Returns (unused_bits, value_bytes, rest). unused_bits is the count from the first content byte; for the SPKI uncompressed- point case this MUST be 0 — caller checks. unused_bits > 7 is rejected. An empty BIT STRING value (no unused_bits byte at all) is also rejected.