das-labor / neopg

The multiversal cryptoengine!
Other
216 stars 16 forks source link

Packet could use header strategy #66

Closed lambdafu closed 6 years ago

lambdafu commented 6 years ago

Currently, we can not influence the way headers are generated. So tests for old style headers need to count bytes manually and set a custom header.

Having different strategies (old vs new, adaptive length type vs fixed length type) could help with that.

Could also be useful to generate backward compatible output with certain compliance profiles.

The custom header could then be one of the strategies. So the solution would likely be a header strategy class (ouch) that comes in different flavors.