In a ton of places throughout the codebase, wherever we make a call to on of the crypto crates' generate()/sign()/verify() functions we always have to have a match statement. For example,
This is an obvious place where DRY and the convenience would save us a lot of lines of code (and overhead). We should create singular interfaces for this set of functionality, within the crypto crate, perhaps multiple different functions depending on what the required set of parameters are (rust doesn't support function overloading, so prefer to use required parameters with named functions; for example sign_crv(curve: Curve) and sign_crv_str(curve: &str)).
In a ton of places throughout the codebase, wherever we make a call to on of the
crypto
crates'generate()
/sign()
/verify()
functions we always have to have amatch
statement. For example,This is an obvious place where DRY and the convenience would save us a lot of lines of code (and overhead). We should create singular interfaces for this set of functionality, within the
crypto
crate, perhaps multiple different functions depending on what the required set of parameters are (rust doesn't support function overloading, so prefer to use required parameters with named functions; for examplesign_crv(curve: Curve)
andsign_crv_str(curve: &str)
).