hildjj / node-cbor

Encode and decode CBOR documents, with both easy mode, streaming mode, and SAX-style evented mode.
MIT License
357 stars 73 forks source link

traverse cbor without decoding to hash certain part of a cbor #113

Closed ashisherc closed 4 years ago

ashisherc commented 4 years ago

I want to hash certain parts of a cbor by traversing through the cbor and hash content. If I decode and encode the data types changes from previous ones due to the fact how js represents some data types.

hildjj commented 4 years ago

Look at lib/commented.js for examples of how to see the bytes as they go by during decoding.

ashisherc commented 4 years ago

continued here, https://github.com/hildjj/node-cbor/issues/114#issue-672500144