working deserialization
This commit is contained in:
parent
3cbdf91cf1
commit
05f62a89aa
|
@ -4,7 +4,7 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = ["serde"]
|
||||||
serde = ["dep:serde"]
|
serde = ["dep:serde"]
|
||||||
md5 = ["dep:md-5"]
|
md5 = ["dep:md-5"]
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@ mod tests {
|
||||||
"sha384-H8BRh8j48O9oYatfu5AZzq6A9RINhZO5H16dQZngK7T62em8MUt1FLm52t+eX6xO"
|
"sha384-H8BRh8j48O9oYatfu5AZzq6A9RINhZO5H16dQZngK7T62em8MUt1FLm52t+eX6xO"
|
||||||
.into_deserializer();
|
.into_deserializer();
|
||||||
let result = Integrity::deserialize(de).unwrap();
|
let result = Integrity::deserialize(de).unwrap();
|
||||||
|
println!("{result:?}");
|
||||||
assert!(result.verify("alert(\'Hello, world.\');"));
|
assert!(result.verify("alert(\'Hello, world.\');"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue