Common traits for cryptographic methods

It seems that the traits here traits/digest at master · RustCrypto/traits · GitHub
do not allow openssl ( @sfackler ) to align cleanly with them. Please see
RustCrypto Traits · Issue #1148 · sfackler/rust-openssl · GitHub

Is there a chance to adjust the (digest) traits so that alignment with openssl is "cleanly" possible?

I don't see where the problem is. The APIs seem to be compatible. Have you tried implementing it?

1 Like

I started once to give it a try. I agree it looks easy enough for the digest methods/trait
I gave up because I don't have not enough Rust-fu. Still learning.

I think I gave up when I tried to turn DigestBytes into GenericArrays. Didn't want to copy stuff around.

Copying into a GenericArray shouldn't be a problem, because they're 16-20 bytes large, and returned by value anyway. LLVM may be able to optimize that out.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.