a-sit-plus / signum

Kotlin Multiplatform Crypto/PKI Library and ASN1 Parser + Encoder
https://a-sit-plus.github.io/signum/
Apache License 2.0
76 stars 6 forks source link

Feature/ktxio number encoding #166

Closed JesusMcCloud closed 1 month ago

JesusMcCloud commented 1 month ago

We cannot yet remove the iterator-based decoding, because ASN.1 depends on it and there is simpyl no way that an iterator can be wrapped into a source without consuming 8kB right away, thus destroying everything. Also: it makes for a nice regression test.

I therefore propose to keep it like that and move the iterator-based foo to the test sources for regression testing after the ASN.1 refactor is done. OR: all in one pull request, where it makes sense, because it is not nearly as independent as you assumed.