pub fn parse(data: &str) -> Result<HealthCert, Error>
Expand description
Parses a Base45 CBOR Web Token containing a EU Health Certificate. No signature validation is currently performed by this crate.
use std::{error::Error, fs::read_to_string};
fn main() -> Result<(), Box<dyn Error>> {
// Read a Base45 payload extracted from a QR code
let buf_str = read_to_string("base45_file.txt")?;
let health_cert = greenpass::parse(&buf_str)?;
println!("{:#?}", health_cert);
Ok(())
}