MCPcopy Create free account
hub / github.com/RustCrypto/utils / read_write_split_reserved

Function read_write_split_reserved

inout/tests/reserved.rs:83–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81/// <https://github.com/RustCrypto/utils/security/advisories/GHSA-2943-gp7x-qg39>
82#[test]
83fn read_write_split_reserved() {
84 let mut buf = [0x11u8; 32];
85 let mut r = InOutBufReserved::from_mut_slice(&mut buf, 16).unwrap();
86 let (mut body, _tag) = r.split_reserved();
87 for i in 0..body.len() {
88 let x = body.get_in()[i];
89 body.get_out()[i] = x ^ 0x5A;
90 }
91}
92
93/// Regression test for
94/// <https://github.com/RustCrypto/utils/security/advisories/GHSA-2943-gp7x-qg39>

Callers

nothing calls this directly

Calls 5

split_reservedMethod · 0.80
lenMethod · 0.80
unwrapMethod · 0.45
get_inMethod · 0.45
get_outMethod · 0.45

Tested by

no test coverage detected