This PR adds the crypto_secretstream_* functions -- and even has tests ;)
But I don't know what balance nim-libsodium wants to strike between matching the libsodium C API and providing a nice interface to Nim users. For instance:
libsodium uses crypto_secretstream_xchacha20poly1305_tag_message and similar functions for MESSAGE, PUSH, REKEY, and FINAL tags. If I were to make it nicer for Nim use, I'd create an Enum for those
libsodium uses crypto_secretstream_xchacha20poly1305_push but I opted for proc push(...) because the first argument implies that the push is for crypto_secretstream_xchacha20poly1305
Anyway, I'm interested in your feedback on this PR. I'd like to use these functions along with the key exchange changes you already merged.
This PR adds the
crypto_secretstream_*
functions -- and even has tests ;)But I don't know what balance nim-libsodium wants to strike between matching the libsodium C API and providing a nice interface to Nim users. For instance:
crypto_secretstream_xchacha20poly1305_tag_message
and similar functions for MESSAGE, PUSH, REKEY, and FINAL tags. If I were to make it nicer for Nim use, I'd create an Enum for thosecrypto_secretstream_xchacha20poly1305_push
but I opted forproc push(...)
because the first argument implies that thepush
is forcrypto_secretstream_xchacha20poly1305
Anyway, I'm interested in your feedback on this PR. I'd like to use these functions along with the key exchange changes you already merged.