traits
traits copied to clipboard
digest: `Mac` trait should provide a verify method which does not move self
I've recently needed to compare a symmetric hmac signature against a &[u8]
. Usually, this is easily possible via Mac::verify_slice
but this moved self
and I only had &mut self
.
I think since there are methods like Mac::finalize_reset
(which takes &mut self
instead of self
), there should also be a verify_(slice)_reset
Method or something like that.