rusticata / der-parser

BER/DER parser written in pure Rust. Fast, zero-copy, safe.
Apache License 2.0
84 stars 29 forks source link

[Question] In `BerObjectContent::BitString` what is the first elem of the pair? #41

Closed Geobert closed 3 years ago

Geobert commented 3 years ago

Hi,

thank you for this crate!

I'm guessing that in https://docs.rs/der-parser/5.0.0/der_parser/ber/enum.BerObjectContent.html#variant.BitString the first element of the pair is the number of unused bits, but I wanted to ask to be sure :)

Am I correct?

(maybe the doc should have an entry for each variant of BerObjectContent?)

Thanks!

chifflier commented 3 years ago

Hi, You're correct, the first argument is the number of unused bits. I'll see to improve the documentation :)

Geobert commented 3 years ago

Thanks, closing this then :)