algorithm: drop unwanted string match

This commit is contained in:
Bilal Elmoussaoui 2022-04-15 02:28:12 +02:00
parent 93387ca2ac
commit 18bb2e888d

View file

@ -135,7 +135,7 @@ impl FromStr for Algorithm {
type Err = anyhow::Error;
fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.to_lowercase().as_ref() {
"sha1" | "otp" => Ok(Self::SHA1),
"sha1" => Ok(Self::SHA1),
"sha256" => Ok(Self::SHA256),
"sha512" => Ok(Self::SHA512),
_ => anyhow::bail!("Unsupported HMAC-algorithm"),