fix: standard base64

This commit is contained in:
əlemi 2024-04-13 06:06:05 +02:00
parent 5d3c222774
commit 9c9b5ec380
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -90,7 +90,7 @@ where
fn verify_control_text(txt: &str, key: &str, control: &str) -> crate::Result<bool> {
let pubkey = PKey::public_key_from_pem(key.as_bytes())?;
let mut verifier = Verifier::new(MessageDigest::sha256(), &pubkey)?;
let signature = base64::prelude::BASE64_URL_SAFE.decode(control)?;
let signature = base64::prelude::BASE64_STANDARD.decode(control)?;
Ok(verifier.verify_oneshot(&signature, txt.as_bytes())?)
}