INNER CODE UNIT · Rust
decrypt_in_place_detached
AChep/keyguard-app · thirdParty/rust/ocb3-0.1.0-keyguard/src/lib.rs:298
fn decrypt_in_place_detached(
&self,
nonce: &Nonce<NonceSize>,
associated_data: &[u8],
buffer: &mut [u8],
tag: &aead::Tag<Self>,
) -> aead::Result<()> {
let expected_tag = self.decrypt_in_place_return_tag(nonce, associated_data, buffer);
if expected_tag.ct_eq(tag).into() {
Ok(())
} else {
Err(Error)
}
}
}
impl<Cipher, NonceSize, TagSize> Ocb3<Cipher, NonceSize, TagSize>
where