-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
RustCrypto/traits
#210Description
Currently the MACs that use block ciphers (CMAC
, PMAC
) require the BlockCipher
in use to be Clone
.
It seems to me that it should be possible to not require Clone
. Instead, conditionally implement Clone
for the Mac
if the BlockCipher
is Clone
?
This would be a breaking change though. Generic code that needs cloning is now requiring just Mac
, and it'll now have to require Mac + Clone
My use case is using a custom block cipher that contains &mut
's inside, so it can't be cloned. (I know it's weird, it's a cipher that does very expensive calculations that sometimes can be cached so it has a mutable ref to a cache).
Metadata
Metadata
Assignees
Labels
No labels