xml-sec 0.2.0

Pure Rust XML Security: XMLDSig, XMLEnc, C14N. Drop-in replacement for libxmlsec1.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;

#[test]
fn decoded_size_limits_keep_the_budget_error_contract() {
    let error = decoded_xml_error(xml_sec_xml_input::Error::DecodedLimit {
        maximum: 8,
        actual: 9,
    });
    assert_eq!(error.kind(), ErrorKind::Budget);
    assert!(matches!(
        error,
        Error::Budget {
            kind: BudgetKind::OwnedBytes,
            limit: 8,
            actual: 9,
        }
    ));
}