rusticata / der-parser

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

Make Oid zero-copy #17

Closed jannschu closed 4 years ago

jannschu commented 5 years ago

Hi,

when parsing oids the binary representation is converted to Vec<u64>.

I propose to keep the binary representation and provide api for the conversion to Vec<u64> (or an iterator implementation).

In my case I use oids basically only for comparison with other oids.

The downsides I see for my proposal are:

The advantages:

I also propose to add a proc macro for easy construction and a Hash implementation.

I can implement the proposed changes if you are interested.

chifflier commented 4 years ago

Closing, merged in #18