ocb_decrypt

Function ocb_decrypt 

Source
pub fn ocb_decrypt(
    cipher: &Aes128,
    encrypted: &[u8],
    nonce: &[u8; 16],
) -> (bool, Vec<u8>, [u8; 16])
Expand description

OCB2 decryption of encrypted under cipher with the given nonce.

Returns (authentic, plaintext, tag). The caller must still compare tag against the transmitted tag; authentic additionally goes false when the decrypted final block matches the XEX*-critical shape, which no honest packet produces.

REF: CryptStateOCB2.cpp : ocb_decrypt.