parallaxsecond / rust-tss-esapi

TSS 2.0 Enhanced System API (ESAPI) Rust wrapper
https://docs.rs/tss-esapi/
Apache License 2.0
86 stars 51 forks source link

Add marshalling to Private (TPM2B_PRIVATE) #457

Closed brandsimon closed 10 months ago

brandsimon commented 11 months ago

Good day,

I need this to load an object created with tpm2_create.

Superhepper commented 11 months ago

Thanks for the PR. It would also be great if you could add some tests for this as well.

brandsimon commented 11 months ago

@Superhepper good catch, done

Superhepper commented 11 months ago

Sorry for not noticing this the first time but it is better to implement the marshall_offset and unmarshall_offset because the default implementation of marshall calls marshall_offset with offset=0.

brandsimon commented 11 months ago

@Superhepper no worries, code looks cleaner with the _offset methods, I like it! :)