wechat_error/convert/
for_hmac.rs

1use hmac::digest::InvalidLength;
2use crate::{AliError, AliErrorKind};
3
4impl From<InvalidLength> for AliError {
5    fn from(value: InvalidLength) -> Self {
6        let kind = AliErrorKind::DecoderError { format: "hmac".to_string(), message: value.to_string() };
7        Self { kind: Box::new(kind) }
8    }
9}