You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While porting Sequoia to Botan, I spent quite a bit of time grepping/reading Botan's source and stepping through the library in order to find the right strings to pass to various constructors like Cipher::new and Privkey::create to specify the algorithm, or methods like Privkey::sign to specify the padding scheme.
I think defining enums for algorithms, cipher modes, and padding schemes and any kind of argument that is currently a string would make the interface much nicer and more discoverable.
The text was updated successfully, but these errors were encountered:
Thanks for raising this issue. There are some similar debates happening wrt the C++ API, but there the situation is harder as C++ enums are so limited 😭 but there is no reason we could not provide Rust enumerations that then map to the expected FFI string.
While porting Sequoia to Botan, I spent quite a bit of time grepping/reading Botan's source and stepping through the library in order to find the right strings to pass to various constructors like
Cipher::new
andPrivkey::create
to specify the algorithm, or methods likePrivkey::sign
to specify the padding scheme.I think defining enums for algorithms, cipher modes, and padding schemes and any kind of argument that is currently a string would make the interface much nicer and more discoverable.
The text was updated successfully, but these errors were encountered: