rusticata/der-parser

It would be good if .as_u64() could parse BitStrings into numbers, too

p1-mmr opened this issue · 1 comments

Hello,

I think that it would be useful if .as_u64() could parse BIT STRING values into numbers, too, as BitStrings turns out to be sometimes used as enumerated integer values in ASN.1 definitions.

I will maybe make a pull request for that if the maintainer is OK.

That looks great for the cases the bitstring is indeed the representation of a small integer. I applied #29, thanks (so closing issue)

For other cases, I'm wondering if the bitvec crate would be a good crate to use to abstract values.