[][src]Function sgx_tcrypto::rsgx_rijndael128_cmac_msg

pub fn rsgx_rijndael128_cmac_msg<T>(
    key: &sgx_cmac_128bit_key_t,
    src: &T
) -> SgxResult<sgx_cmac_128bit_tag_t> where
    T: Copy + ContiguousMemory

The rsgx_rijndael128_cmac_msg function performs a standard 128bit CMAC hash over the input data buffer.

Description

The rsgx_rijndael128_cmac_msg function performs a standard CMAC hash over the input data buffer. Only a 128-bit version of the CMAC hash is supported.

The function should be used if the complete input data stream is available. Otherwise, the Init, Update… Update, Final procedure should be used to compute a CMAC hash over multiple input data sets.

Parameters

key

A pointer to key to be used in the CMAC hash operation. The size must be 128 bits.

src

A pointer to the input data stream to be hashed.

Requirements

Library: libsgx_tcrypto.a

Return value

The 128-bit hash that has been CMAC calculated

Errors

SGX_ERROR_INVALID_PARAMETER

The pointer is invalid.

SGX_ERROR_OUT_OF_MEMORY

Not enough memory is available to complete this operation.

SGX_ERROR_UNEXPECTED

An internal cryptography library failure occurred.