traits icon indicating copy to clipboard operation
traits copied to clipboard

digest: `Mac` trait should provide a verify method which does not move self

Open Erik1000 opened this issue 2 years ago • 0 comments

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.

Erik1000 avatar Jul 16 '22 15:07 Erik1000